src/Field/Generic.php
public function validate()
    {
        foreach ($this->validationRules as $rule) {
            $rule->validate($this->getValue());

            if (!$rule->isValid()) {
                $this->errors += $rule->getError();
            }
        }

        $this->validated = true;
    }
public function validate()
    {
        foreach ($this->validationRules as $rule) {
            $rule->validate($this->getValue());

            if (!$rule->isValid()) {
                $this->errors += $rule->getError();
            }
        }

        $this->validated = true;
    }
public function validate ( ) { foreach ( $ this -> validationRules as $ rule ) { $ rule -> validate ( $ this -> getValue ( ) ) ; if ( ! $ rule -> isValid ( ) ) { $ this -> errors += $ rule -> getError ( ) ; } } $ this -> validated = true ; }
Validates the field
Validates the field