php-json-schema icon indicating copy to clipboard operation
php-json-schema copied to clipboard

PHP 5.3 implementation of json schema validation.

Results 15 php-json-schema issues
Sort by recently updated
recently updated
newest added

I just found this on packagist. I have contributed to [justinrainbow/json-schema](https://github.com/justinrainbow/json-schema) in the past because we needed it for composer. I want to propose merging the two projects. I'm not...

The following code causes a bug where the `minimum` is not enforced if the value is `0`. https://github.com/hasbridge/php-json-schema/blob/62b2bb92fe05aca3f81e257cf721fe92dec5a167/src/Json/Validator.php#L422 It has been fixed in a later commit but the latest version...

Just pulling in a little one-liner from here: http://stackoverflow.com/a/39851294/1779433

Please, I think there is a bug, comparing unique array, when items are objects. Consider: protected function checkUniqueItems($entity, $schema, $entityName) { if (isset($schema->uniqueItems) && $schema->uniqueItems) { if (count(array_unique($entity)) != count($entity))...

According to the examples I've seen on mailing lists, JSON Schema's patterns look like this: ``` javascript { "type": "string", "pattern": "^[a-zA-Z]*$" } ``` Your tests assume they start and...

The current code requires you to pass a file path when constructing the Validator; however, sometimes you don't have the schema in a file (e.g. it's in a database). This...

Placing the definitions of "ValidationException" and "SchemaException" inside the Validator file is no good for autoloading through Composer. If one has not loaded instantiated the Validator class, Composer will believe...

This allows for PSR style autoloading without having to load the main class first. Tests pass. USE CASE: Some class is trying to catch a ValidationException. Autoloader needs to load...

The constructor only has one method of loading a schema, via a file path determined by $schemaFile. Can we allow for this to be some JSON string and not use...