示例#1
0
文件: Validate.php 项目: titon/g11n
 /**
  * {@inheritdoc}
  */
 public static function postalCode($input, $format = null)
 {
     return parent::postalCode($input, self::get('postalCode', $format));
 }
示例#2
0
 /**
  * Test that postalCode() validates against the locales postal code rule.
  */
 public function testPostalCode()
 {
     $this->assertTrue(Validate::postalCode('38842'));
     $this->assertTrue(Validate::postalCode('38842-0384'));
     $this->assertFalse(Validate::postalCode('3842'));
     $this->assertFalse(Validate::postalCode('38842.0384'));
     $this->assertFalse(Validate::postalCode('AksiS-0384'));
 }