validation for ad and tasks