public function buildValidator()
    {
        if ($this->validator_built) {
            return $this->validator;
        }

        foreach ($this->rows as $name => $row) {
            foreach ($row->getRules() as $rule) {
                $this->validator->addRule($name, $rule);
            }
            $row->disableRules();
        }
        $this->validator_built = true;

        return $this->validator;
    }
public function buildValidator()
    {
        if ($this->validator_built) {
            return $this->validator;
        }

        foreach ($this->rows as $name => $row) {
            foreach ($row->getRules() as $rule) {
                $this->validator->addRule($name, $rule);
            }
            $row->disableRules();
        }
        $this->validator_built = true;

        return $this->validator;
    }
public function buildValidator ( ) { if ( $ this -> validator_built ) { return $ this -> validator ; } foreach ( $ this -> rows as $ name => $ row ) { foreach ( $ row -> getRules ( ) as $ rule ) { $ this -> validator -> addRule ( $ name , $ rule ) ; } $ row -> disableRules ( ) ; } $ this -> validator_built = true ; return $ this -> validator ; }
Add the rules from all rows to form a complete Validator for
this form. The Validator can only be built once - no additional
rules may be added after building.
Add the rules from all rows to form a complete Validator for this form . The Validator can only be built once - no additional rules may be added after building .