Posted By

ef on 02/08/11


Tagged

REGON


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

memonic


Polish REGON validator in Symfony


 / Published in: Symfony
 

  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  

You need to login to post a comment.