phone() public static method

Checks phone number for Ukraine
public static phone ( string $check ) : boolean
$check string The value to check.
return boolean Success.
Example #1
0
 /**
  * test phone method of UaValidation
  *
  * @return void
  */
 public function testPhone()
 {
     $this->assertTrue(UaValidation::phone('+38-044-283-93-57'));
     $this->assertTrue(UaValidation::phone('(068)2839357'));
     $this->assertTrue(UaValidation::phone('+380442839357'));
     $this->assertFalse(UaValidation::phone('+38 (063)537-28-07'));
     $this->assertTrue(UaValidation::phone('8044223-95-26'));
     $this->assertTrue(UaValidation::phone('+380612839357'));
 }