/** * {@inheritdoc} */ public static function postalCode($input, $format = null) { return parent::postalCode($input, self::get('postalCode', $format)); }
/** * 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')); }