Skip to content

A respect/validation instances creator from JSON Schemas

License

Notifications You must be signed in to change notification settings

augusthur/json-respector

Repository files navigation

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.

About

A respect/validation instances creator from JSON Schemas

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages