ztsu / irritator
Schema-oriented assertion library
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ztsu/irritator
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: ^6.0
This package is not auto-updated.
Last update: 2025-10-12 07:13:39 UTC
README
Schema-oriented assertion libary for PHP
Requirements
- PHP 7.*
Install
$ composer require ztsu/irritator
Basic usage
use Ztsu\Irritator as Assert;
$schema = Assert\hashmap(
[
"name" => Assert\isString(),
]
);
$value = [
"name" => "Test",
];
$schema->valid($value);
Assertions
Basic
- int
- number
- string
- boolean
- list
- hashmap
- same
- equal
- regexp
Combinators
- one of
- null or
Numbers
- less than
- greater than
- less or equal
- greater or equal
Strings
- url
- phone
- ip v4
- ip v6
- uuid
Dates
- ISO 8601
Hashmap
- required
- one of keys
License
Irritator is licensed under the MIT License. For details see the LICENSE.md file.