PHPackages                             claroline/jval - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. claroline/jval

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

claroline/jval
==============

JSON Schema validator

1.0.0(9y ago)0729MITPHPPHP &gt;=5.4.1

Since Sep 25Pushed 2y agoCompare

[ Source](https://github.com/claroline/JVal)[ Packagist](https://packagist.org/packages/claroline/jval)[ Docs](https://github.com/stefk/JVal)[ RSS](/packages/claroline-jval/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

JVal
====

[](#jval)

A [JSON Schema](http://json-schema.org) validator written in PHP.

Features:

- Full draft 4 support (passes the whole official \[test suite\] (), except for the two tests that require big nums to be treated as integers, which is not feasible in PHP)
- Distinct steps for references resolution, syntax parsing and data validation.

[![Build Status](https://camo.githubusercontent.com/059ad1ddd75bd19015449a0e6df8287d220a8f9edf5ffc60274d58472e8c9760/68747470733a2f2f7472617669732d63692e6f72672f737465666b2f4a56616c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/stefk/JVal)[![Code Coverage](https://camo.githubusercontent.com/b9f34316cbf07300f9aa21aeab2856223e8005570ec3a593c45414596b28a7ba/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f737465666b2f4a56616c2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/stefk/JVal/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/cc5db874431f50498de9020d4c3906f14e71dbe972881eef712356ced8137c46/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f737465666b2f4a56616c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/stefk/JVal/?branch=master)

Installation
------------

[](#installation)

`composer require stefk/jval dev-master`

Basic usage
-----------

[](#basic-usage)

```
$validator = JVal\Validator::buildDefault();
$violations = $validator->validate($data, $schema);
```

Data can be anything that might result from a call to `json_decode`. The schema must be the JSON-decoded representation of a JSON Schema, i.e. a `stdClass`instance.

If the schema contains relative references to external schemas (either remote or local), the absolute URI of the base schema will probably be needed as well:

```
$validator = JVal\Validator::buildDefault();
$violations = $validator->validate($data, $schema, 'file://path/to/the/schema');
```

CLI
---

[](#cli)

```
bin/jval path/to/data path/to/schema

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3522d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b13fbb198f4e207981c25eb20ec734896e833c28260f83cca6d764bbcac94945?d=identicon)[Elorfin](/maintainers/Elorfin)

---

Top Contributors

[![stefk](https://avatars.githubusercontent.com/u/880921?v=4)](https://github.com/stefk "stefk (120 commits)")[![JanTvrdik](https://avatars.githubusercontent.com/u/175109?v=4)](https://github.com/JanTvrdik "JanTvrdik (11 commits)")[![Elorfin](https://avatars.githubusercontent.com/u/5363219?v=4)](https://github.com/Elorfin "Elorfin (1 commits)")

---

Tags

jsonvalidationjson-schema

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/claroline-jval/health.svg)

```
[![Health](https://phpackages.com/badges/claroline-jval/health.svg)](https://phpackages.com/packages/claroline-jval)
```

###  Alternatives

[opis/json-schema

Json Schema Validator for PHP

64736.9M186](/packages/opis-json-schema)[geraintluff/jsv4

A (coercive) JSON Schema v4 Validator for PHP

115455.2k4](/packages/geraintluff-jsv4)[romaricdrigon/metayaml

Using \[Yaml|Xml|json\] schemas files to validate \[Yaml|Xml|json\]

103306.5k8](/packages/romaricdrigon-metayaml)[evaisse/php-json-schema-generator

A JSON Schema Generator.

20298.5k1](/packages/evaisse-php-json-schema-generator)[fab2s/dt0

Immutable DTOs with bidirectional casting. No framework required. 8x faster than the alternative.

101.6k1](/packages/fab2s-dt0)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
