ajgl/validator-es
Validation library for some Spanish codes.
Maintainers
Requires
- php: >=8.1
- symfony/polyfill-intl-icu: ^1.28
- thecodingmachine/safe: ^3.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.52
- friendsofphp/php-cs-fixer: ^3.95.3
- matthiasnoback/symfony-dependency-injection-test: ^6.3
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^2.2.1
- phpstan/phpstan-phpunit: ^2.0.16
- phpunit/phpunit: ^11.5.55
- rector/rector: ^2.4.5
- symfony/framework-bundle: ^5.4 || ^6.4 || ^7.4 || ^8.0
- symfony/validator: ^5.4 || ^6.4 || ^7.4 || ^8.0
- symfony/var-dumper: ^5.4 || ^6.4 || ^7.4 || ^8.0
- thecodingmachine/phpstan-safe-rule: ^1.4.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT 8f6f9f81759b3e33efb279051e5d7aa2f2047a36
- Antonio J. GarcΓa Lagar <aj.woop@garcialagar.es>
This package is auto-updated.
Last update: 2026-06-01 07:04:58 UTC
README
This library provides some validators for common Spanish codes.
π Build Status
π Latest Stable Version
π Total Downloads
π Latest Unstable Version
π License
π PHP Version Require
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.
