postal() public static method

Checks a postal (zip) code for Ukraine
public static postal ( string $check ) : boolean
$check string The value to check.
return boolean Success.
Beispiel #1
0
 /**
  * test the postal method of UaValidation
  *
  * @return void
  */
 public function testPostal()
 {
     $this->assertTrue(UaValidation::postal('85111'));
     $this->assertTrue(UaValidation::postal('01996'));
     $this->assertTrue(UaValidation::postal('65000'));
     $this->assertFalse(UaValidation::postal('019962'));
     $this->assertFalse(UaValidation::postal('019961'));
     $this->assertFalse(UaValidation::postal('0199'));
 }