postal() public static method

Checks a postal code.
public static postal ( string $check ) : boolean
$check string The value to check.
return boolean Success.
Beispiel #1
0
 /**
  * test the postal method of BdValidation
  *
  * @return void
  */
 public function testPostal()
 {
     $this->assertTrue(BdValidation::postal('1200'));
     $this->assertTrue(BdValidation::postal('3100'));
     $this->assertFalse(BdValidation::postal('111'));
     $this->assertFalse(BdValidation::postal('11123'));
 }