Specific validation methods for data used in Finland.
Every module of Validate follows the same philosophy. Propose some validation method which returns a boolean result.
Some methods have some optional parameters to set stronger checks.
<?php
// Include the package
require_once 'Validate/FI.php';
// Validate Finnish telephone number
$phoneNumber = '+358 40 1234567';
if ( Validate_FI::phoneNumber($phoneNumber) ) {
print 'Valid';
} else {
print 'Not valid!';
}
?>
Output:
Valid