ajgl / validator-es
Validation library for some Spanish codes.
Installs: 1 918
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=8.1
- symfony/polyfill-intl-icu: ^1.28
- thecodingmachine/safe: ^2.5
Requires (Dev)
- ergebnis/composer-normalize: ^2.34
- friendsofphp/php-cs-fixer: ^3.22
- matthiasnoback/symfony-dependency-injection-test: ^5.1
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^1.10
- phpstan/phpstan-phpunit: ^1.3
- phpunit/phpunit: ^9.6 || ^10.2
- rector/rector: ^1.2
- symfony/framework-bundle: ^5.4 || ^6.4 || ^7
- symfony/validator: ^5.4 || ^6.4 || ^7
- symfony/var-dumper: ^5.4 || ^6.4 || ^7
- thecodingmachine/phpstan-safe-rule: ^1.2
This package is auto-updated.
Last update: 2024-10-27 10:43:02 UTC
README
This library provides some validators for common Spanish codes.
Current supported codes to validate are:
Installation
composer require ajgl/validator-es
Usage
All validators implements a common interface with only one method:
<?php namespace Ajgl\ValidatorEs; interface ValidatorInterface { public function isValid(mixed $value): bool; }
To use any validator, you must instantiate it, and call the isValid
method:
<?php require 'vendor/autoload.php'; $value = 'Y0000000Z'; $validator = new \Ajgl\ValidatorEs\IdCardValidator(); assert($validator->isValid($value));
License
This library is released under an open source license. See the complete license in the LICENSE file.
Reporting an issue or a feature request
Read the CONTRIBUTING.md file.
Author Information
Developed with ♥ by Antonio J. García Lagar.
If you find this library useful, please add a ★ in the GitHub repository page.