This repo contains Helper classes used for various Validation tasks
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)
- php: >7.1
- composer installed
Run Tests
composer test
composer lint
composer lint:fix