Polish REGON validator in Symfony


/ Published in: Symfony
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $regonValidator1 = new sfValidatorRegex(array('pattern' => '/^[0-9]{14}$/'));
  2. $regonValidator2 = new sfValidatorRegex(array('pattern' => '/^[0-9]{9}$/'));
  3. $this->validatorSchema['regon'] = new sfValidatorOr(array($regonValidator1,
  4. $regonValidator2),
  5. array(),
  6. array('invalid' => 'REGON jest nieprawid��owy'));

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.