【文件属性】:
文件名称:pasvl:数组验证器(数组的正则表达式,某种)
文件大小:33KB
文件格式:ZIP
更新时间:2021-05-22 19:51:57
php validation array php71 php72
PASVL-PHP数组结构验证库
考虑与字符串abab匹配的正则表达式[ab]+ 。 现在对阵列进行相同的成像。
该库的目的是针对模板验证现有(嵌套)数组并报告不匹配情况。 它具有面向对象的可扩展体系结构,可以编写和添加自定义验证器。
当前用户注意:此版本与先前的0.5.6不向后兼容。
安装
composer require lezhnev74/pasvl
例子
请参考“ Example文件夹中的文件。
用法
阵列验证
// Define the pattern of the data, define keys and values separately
$ pattern = [
'*' => [
'type' => 'book' ,
'title' => ':string :contains("book")' ,
'cha
【文件预览】:
pasvl-master
----composer.json(837B)
----LICENSE(1KB)
----src()
--------Validation()
--------Parsing()
----.gitignore(84B)
----README.md(7KB)
----.gitattributes(299B)
----.githooks()
--------pre-commit(2KB)