A Validator which transforms JSON Schemas to respect/validation instances.
Draft 6
Via Composer
$ composer require augusthur/json-respector
// Create the Validator Service instance
$validation = new Augusthur\JsonRespector\ValidatorService();
// Generate a Respect Validator instance from a JSON schema string
$v = $validation->fromSchema('{"type": "string", "minLength": 3}');
// Returns true
$v->validate('abcde');
// To use the plain Respect Validator use start()
// Returns true
$validation->start()->numeric()->validate(123);
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, just use the issue tracker.
The MIT License (MIT). Please see License File for more information.