/** * Validate each rules of this field. * It will run the rules list validate method, passing this value * and filling the attribute field with this instance. * @return ValidationResult */ public function validate() { $results = $this->rules->validate($this->value); foreach ($results->getResults() as $result) { $result->field = $this; } return $results; }
/** * Validate each rules of this chain. * * @param mixed $input Input to validate. * * @return ValidationResult */ public function validate($input) { return $this->rules->validate($input); }