Fuel\Validation\RuleInterface::validate PHP Method

validate() public method

$field and $allFields are optional values to allow the validation rule to have some idea of context. This allows for rules such as "required" and "match field", validation rules that act on all the data rather than a single field. If a validation rule requires $field or $allFields but is not passed a value the rule should return false rather than throwing an exception.
Since: 2.0
public validate ( mixed $value, string $field = null, array $allFields = null ) : boolean | Fuel\Validation\ResultInterface
$value mixed Value to validate
$field string Name of the field that is being validated
$allFields array Values of all the other fields being validated
return boolean | Fuel\Validation\ResultInterface
    public function validate($value, $field = null, $allFields = null);