PHP Class Cake\Localized\Validation\IrValidation

Inheritance: extends LocalizedValidation
Mostra file Open project: cakephp/localized Class Usage Examples

Public Methods

Method Description
alphaNumeric ( string $check ) : boolean Checks for Persian/Farsi characters and number an zero width non-joiner space.
cc ( string $check ) : boolean Validation of Iran credit card numbers.
mobile ( string $check ) : boolean Checks mobile numbers for Iran.
numeric ( string $check ) : boolean Checks for Persian/Farsi digits only and won't accept Arabic and Latin digits.
personId ( string $check ) : boolean Checks a social security number for Iran.
phone ( string $check ) : boolean Checks a phone number for Iran.
postal ( string $check ) : boolean Checks a postal code for Iran.

Method Details

alphaNumeric() public static method

Also accepts latin numbers preventing potential problem until PHP becomes fully unicode compatible.
public static alphaNumeric ( string $check ) : boolean
$check string The value to check.
return boolean Success.

cc() public static method

Validation of Iran credit card numbers.
public static cc ( string $check ) : boolean
$check string The value to check.
return boolean Success.

mobile() public static method

Checks mobile numbers for Iran.
public static mobile ( string $check ) : boolean
$check string The value to check.
return boolean Success.

numeric() public static method

Checks for Persian/Farsi digits only and won't accept Arabic and Latin digits.
public static numeric ( string $check ) : boolean
$check string The value to check.
return boolean Success.

personId() public static method

Checks a social security number for Iran.
public static personId ( string $check ) : boolean
$check string The value to check.
return boolean Success.

phone() public static method

Checks a phone number for Iran.
public static phone ( string $check ) : boolean
$check string The value to check.
return boolean Success.

postal() public static method

Checks a postal code for Iran.
public static postal ( string $check ) : boolean
$check string The value to check.
return boolean Success.