ajgl / validator-es
一些西班牙代码的验证库。
0.1.4
2024-01-12 07:57 UTC
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: ^4.3
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^1.10
- phpstan/phpstan-phpunit: ^1.3
- phpunit/phpunit: ^9.6 || ^10.2
- rector/rector: ^0.19
- 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-08-30 19:36:25 UTC
README
此库提供了一些常见西班牙代码的验证器。
当前支持的验证代码包括
安装
composer require ajgl/validator-es
使用方法
所有验证器实现了一个公共接口,仅有一个方法
<?php namespace Ajgl\ValidatorEs; interface ValidatorInterface { public function isValid(mixed $value): bool; }
要使用任何验证器,您必须实例化它,并调用isValid
方法
<?php require 'vendor/autoload.php'; $value = 'Y0000000Z'; $validator = new \Ajgl\ValidatorEs\IdCardValidator(); assert($validator->isValid($value));
许可证
此库在开源许可证下发布。请参阅LICENSE文件中的完整许可证。
报告问题或功能请求
阅读CONTRIBUTING.md文件。
作者信息
如果您觉得这个库很有用,请在GitHub仓库页面上添加一个★。