PHP code example of crazyfactory / validation
1. Go to this page and download the library: Download crazyfactory/validation library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
crazyfactory / validation example snippets
use CrazyFactory\Validation\ZipCode\Validator as ZipCodeValidator;
use CrazyFactory\Validation\ZipCode\Sanitizer as ZipCodeSanitizer;
$isValidZipCode = ZipCodeValidator::isValid($zipCode, $countryCode);
// => bool
$zipCode = ZipCodeSanitizer::sanitize($zipCode, $countryCode);
// => a sanitized and valid zip code (original code on failure)