postal() public static method

Checks a postal code for The United Kingdom
public static postal ( string $check ) : boolean
$check string The value to check.
return boolean Success.
Example #1
0
 /**
  * test the postal method of GbValidation
  *
  * @return void
  */
 public function testPostal()
 {
     $this->assertTrue(GbValidation::postal('DT4 8PP'));
     $this->assertFalse(GbValidation::postal('DT4-8PP'));
 }