twentytwo-labs / array-comparator
There is no license information available for the latest version (2.0.1) of this package.
2.0.1
2026-09-01 20:34 UTC
Requires
- php: >=8.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.8
- infection/infection: ^0.29|^0.35
- phpstan/phpstan: ^2.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^12.3
- squizlabs/php_codesniffer: ^3.10
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
This library can validate array in recursive. If one or more fields not match, there is an exception
In some cases the need for more advanced matching arises. All custom functions is used in place of the string value they are validating
<array>- Match only if value is an array or json object
<date>- Regex
^[0-9]{4}-[0-9]{2}-[0-9]{2}$ - Ex:
2022-06-01
- Regex
<dateTime>- regex
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\+[0-9]{2}:[0-9]{2}$ - Ex:
2021-09-22T14:45:59+02:00
- regex
<int>- Match only if value is an integer
- Ex:
3
<string>- Match only if value is a string
- Ex:
"Foo"
<uuid>- Match only if value is an uuid