crazyfactory / validation
Helper classes to validate inputs.
2.0.0
2023-03-08 06:20 UTC
Requires
- php: ^8.2
- ext-soap: *
Requires (Dev)
- codeception/codeception: ^4.0
- codeception/module-asserts: ^2.0
- crazyfactory/sniffs: ^1.3
- phpunit/phpunit: ^9.6
This package is not auto-updated.
Last update: 2024-11-01 08:33:37 UTC
README
This repo contains Helper classes used for various Validation tasks
Example usage
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)
Requirements
- php: >7.1
- composer installed
Scripts
Run Tests
composer test
Lint
composer lint
Auto-fix of linting errors
composer lint:fix