Fuel\Validation\Validator::__call PHP Method

__call() public method

Allows validation rules to be dynamically added using method chaining.
Since: 2.0
public __call ( string $name, array $arguments )
$name string
$arguments array
    public function __call($name, $arguments)
    {
        // Create and then add the new rule to the last added field
        $rule = $this->createRuleInstance($name, $arguments);
        $this->addRule($this->lastAddedField, $rule);
        return $this;
    }