Fuel\Validation\Rule\Enum::validate PHP Method

validate() public method

Performs validation on the given value
Since: 2.0
public validate ( mixed $value, string $field = null, array $allFields = null ) : boolean
$value mixed Value to validate
$field string Unused by this rule
$allFields array Unused by this rule
return boolean
    public function validate($value, $field = null, $allFields = null)
    {
        $values = $this->getParameter();
        return in_array($value, $values, $this->strict);
    }