Validate task.