json-respector
![Software License][ico-license]
![Coverage Status][ico-scrutinizer]
![Total Downloads][ico-downloads], (*1)
A Validator which transforms JSON Schemas to respect/validation instances., (*2)
Supported Rules
Draft 6, (*3)
Install
Via Composer, (*4)
``` bash
$ composer require augusthur/json-respector, (*5)
## Usage
``` php
// 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);
Change log
Please see CHANGELOG for more information on what has changed recently., (*6)
Contributing
Please see CONTRIBUTING and CONDUCT for details., (*7)
Security
If you discover any security related issues, just use the issue tracker., (*8)
Credits
License
The MIT License (MIT). Please see License File for more information., (*9)