Skip to content

Latest commit

 

History

History
75 lines (51 loc) · 2.42 KB

README.md

File metadata and controls

75 lines (51 loc) · 2.42 KB

json-respector

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

A Validator which transforms JSON Schemas to respect/validation instances.

Supported Rules

Draft 6

Install

Via Composer

$ composer require augusthur/json-respector

Usage

// 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.

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, just use the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.