task_command = $task_command; } /** * Determine if the validation rule passes. * * @param string $attribute * @param mixed $value * @return bool */ public function passes($attribute, $value) { if ($this->task_command === 'rconfig:download-device' && empty($value)) { return false; } return true; } /** * Get the validation error message. * * @return string */ public function message() { return 'The ' . $this->commandLookupTable($this->task_command) . ' task type must have devices associated with it. Please select at least one device.'; } }