library irritator
Schema-oriented assertion library
ztsu/irritator
Schema-oriented assertion library
- Saturday, September 9, 2017
- by ztsu
- Repository
- 1 Watchers
- 0 Stars
- 7 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
Ztsu\Irritator
Schema-oriented assertion libary for PHP, (*1)
Requirements
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
Numbers
- less than
- greater than
- less or equal
- greater or equal
Strings
- email
- url
- phone
- ip v4
- ip v6
- uuid
Dates
Hashmap
License
Irritator is licensed under the MIT License. For details see the LICENSE.md file., (*2)
dev-master
9999999-dev
Schema-oriented assertion library
Sources
Download
MIT
The Requires
The Development Requires
by
Alexey Golovnya