nif() public static method

Only checks the NIF type personId.
public static nif ( string $check ) : boolean
$check string The value to check.
return boolean Success
Example #1
0
 /**
  * Test the nif validation.
  *
  * @return void
  */
 public function testNif()
 {
     $this->assertTrue(EsValidation::nif('K1254868A'));
     $this->assertTrue(EsValidation::nif('K3548762H'));
     $this->assertTrue(EsValidation::nif('L5876542A'));
     $this->assertFalse(EsValidation::nif('X5876542A'));
     $this->assertFalse(EsValidation::nif('Z2548769Y'));
     $this->assertFalse(EsValidation::nif('32050031Z'));
 }