/ Published in: Symfony
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$regonValidator1 = new sfValidatorRegex(array('pattern' => '/^[0-9]{14}$/')); $regonValidator2 = new sfValidatorRegex(array('pattern' => '/^[0-9]{9}$/')); $this->validatorSchema['regon'] = new sfValidatorOr(array($regonValidator1, $regonValidator2), array(), array('invalid' => 'REGON jest nieprawid��owy'));