postal() публичный статический Метод

Checks a postal code for The United States
public static postal ( string $check ) : boolean
$check string The value to check.
Результат boolean Success.
Пример #1
0
 /**
  * test the postal method of UsValidation
  *
  * @return void
  */
 public function testPostal()
 {
     $this->assertTrue(UsValidation::postal('89104'));
     $this->assertFalse(UsValidation::postal('111'));
     $this->assertFalse(UsValidation::postal('1111'));
     $this->assertFalse(UsValidation::postal('130896'));
     $this->assertFalse(UsValidation::postal('13089-33333'));
     $this->assertFalse(UsValidation::postal('13089-333'));
     $this->assertFalse(UsValidation::postal('13A89-4333'));
     $this->assertTrue(UsValidation::postal('13089-3333'));
     $this->assertFalse(UsValidation::postal('NV 89104'));
 }