/** * @see sfValidatorBase */ protected function doClean($value) { $clean = (string) $value; $tmp = ''; if (!Validate_PL::pesel($clean, $tmp)) { throw new sfValidatorError($this, 'invalid'); } return $clean; }
/** * @see sfValidatorBase */ protected function doClean($value) { $clean = (string) $value; if (!$this->getOption('separator')) { $clean = str_replace('-', '', $clean); } if (!Validate_PL::nip($clean)) { throw new sfValidatorError($this, 'invalid'); } return $clean; }
/** * Validates REGON (Polish statistical national economy register) * * Sprawdza REGON (Rejestr Gospodarki Narodowej) * http://chemeng.p.lodz.pl/zylla/ut/nip-rego.html * * @param string $regon 9- or 14- digit number to validate * * @return bool */ public static function regon($regon) { return Validate_PL::region($regon); }