PHPackages                             schematicon/validator - 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. schematicon/validator

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

schematicon/validator
=====================

Schemation Validator is powerful validator of various data structures.

v1.2.0(7y ago)2082.6k↓17.5%2[5 issues](https://github.com/schematicon/validator-php/issues)1MITPHPPHP &gt;=7.0

Since May 18Pushed 7y ago4 watchersCompare

[ Source](https://github.com/schematicon/validator-php)[ Packagist](https://packagist.org/packages/schematicon/validator)[ Docs](https://github.com/schematicon/validator-php)[ RSS](/packages/schematicon-validator/feed)WikiDiscussions master Synced 1mo ago

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

Schematicon Validator (PHP)
===========================

[](#schematicon-validator-php)

[![Build Status](https://camo.githubusercontent.com/cf6b3499b91cfa535afffd1df038335f4502b7411bccb4198977dc0de7ecb77b/68747470733a2f2f7472617669732d63692e6f72672f736368656d617469636f6e2f76616c696461746f722d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/schematicon/validator-php)[![Downloads this Month](https://camo.githubusercontent.com/39349dc6bc09c60558f581e3d4f80a68e7cfe63dbfca1915b28da13ecb27cf56/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f736368656d617469636f6e2f76616c696461746f722e7376673f7374796c653d666c6174)](https://packagist.org/packages/schematicon/validator)[![Stable version](https://camo.githubusercontent.com/13aeca602ad4f075339a7636aa0a9f3997eb9bd1dd0d122c23302969304fedef/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736368656d617469636f6e2f76616c696461746f722e7376673f7374796c653d666c6174)](https://packagist.org/packages/schematicon/validator)

**Validator** is [Schematicon Schema](https://github.com/schematicon/spec) validator. Schemeaticon schema is innovative declarative language for data structure description. It is programming-language independent; that means you can define the schema using [NEON](https://ne-on.org/), YAML or native PHP arrays.

### Example

[](#example)

`my_family.neon`:

```
type: map
properties:
    name: string
    surname: string
    sex:
        enum: [male, female]
    age: int|null # property may be a null
    ?height: float # property may not exist at all; if exist, it has to be a float
    siblings:
        type: array
        item:
            type: string
```

The following inputs may be validated againts the defined schema:

```
$normalizer = new Schematicon\Validator\Normalizer();
$schema = Neon\Neon::decode(file_get_contents('./my_family.neon'));
$schema = $normalizer->normalize($schema);
$validator = new Schematicon\Validator\Validator($schema);

$result = $validator->validate([
	'name' => 'jon',
	'surname' => 'snow',
	'sex' => 'male',
	'age' => 18,
	'height' => 180.00,
	'siblings' => ['Arya'],
]);

$result->isValid(); // true
$result->getErrors(); // []
```

### Installation

[](#installation)

Use composer:

```
$ composer require schematicon/validator
```

### License

[](#license)

MIT. See full [license](license.md).

The development was sponsored by [Sygic Travel](https://travel.sygic.com).

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 93.3% 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

Every ~335 days

Total

3

Last Release

2617d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/953773db6e30161b5e76572bf909c24e8ef07d7419aeebc311e071600ea99bef?d=identicon)[hrach](/maintainers/hrach)

---

Top Contributors

[![hrach](https://avatars.githubusercontent.com/u/284263?v=4)](https://github.com/hrach "hrach (56 commits)")[![jkuchar](https://avatars.githubusercontent.com/u/133822?v=4)](https://github.com/jkuchar "jkuchar (2 commits)")[![costasovo](https://avatars.githubusercontent.com/u/1082140?v=4)](https://github.com/costasovo "costasovo (1 commits)")[![michalhlavka](https://avatars.githubusercontent.com/u/15013378?v=4)](https://github.com/michalhlavka "michalhlavka (1 commits)")

---

Tags

validatorstructureschematicon

### Embed Badge

![Health badge](/badges/schematicon-validator/health.svg)

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

###  Alternatives

[respect/validation

The most awesome validation engine ever created for PHP

5.9k37.4M383](/packages/respect-validation)[seld/jsonlint

JSON Linter

1.3k217.8M205](/packages/seld-jsonlint)[composer/spdx-licenses

SPDX licenses list and validation library.

1.4k184.2M25](/packages/composer-spdx-licenses)[opis/json-schema

Json Schema Validator for PHP

64736.9M186](/packages/opis-json-schema)[intervention/validation

Additional validation rules for the Laravel framework

6826.7M8](/packages/intervention-validation)[laminas/laminas-validator

Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria

15644.9M188](/packages/laminas-laminas-validator)

PHPackages © 2026

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