PHPackages                             latinosoft/validation - 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. latinosoft/validation

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

latinosoft/validation
=====================

Data validation library (Siriusphp/Validation updated fork). Validate arrays, array objects, domain models etc using a simple API. Easily add your own validators on top of the already dozens built-in validation rules

1.1.3(6y ago)09MITPHPPHP &gt;=7.0

Since May 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jsnoriegam/validation)[ Packagist](https://packagist.org/packages/latinosoft/validation)[ RSS](/packages/latinosoft-validation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

\#Latinosoft Validation

Latinosoft Validation (Fork of Sirius Validation) is a library for data validation. It offers:

1. [validator object](docs/validator.md)
2. [45 build-in validation rules](docs/validation_rules.md). There are validators for strings, array, numbers, emails, URLs, files and uploads
3. [validation helper](docs/helper.md) to simplify the validation of single values

Out-of-the-box, the library can handle `array`s, `ArrayObject`s and objects that have implemented the `toArray` method. In order to validate other data containers you must create a [`DataWrapper`](https://github.com/jsnoriegam/validation/blob/master/src/Validation/DataWrapper/WrapperInterface.php) so that the validator be able to extract data from your object.

Elevator pitch
--------------

[](#elevator-pitch)

```
$validator = new \Latinosoft\Validation\Validator;

// add a validation rule
$validator->add('title', 'required');

// add a rule that has a list of options
$validator->add('title', 'length', array('min' => 10, 'max' => 100));
// or use JSON
$validator->add('title', 'length', '{"min": 10, "max": 100}');
// or a URL query string
$validator->add('title', 'length', 'min=10&max=100');
// or, if you know that the validator can CORECTLY parse (ie: understand) the options string
$validator->add('title', 'length', '10,100');

// add a rule with a custom error message
$validator->add('title', 'maxlength', 'max=100', 'Article title must have less than {max} characters');

// add a rule with a custom message and a label (very handy with forms)
$validator->add('title:Title', 'maxlength', 'max=100', '{label} must have less than {max} characters');

// add all of rule's configuration in a string (you'll see later why it's handy')
$validator->add('title:Title', 'maxlength(max=255)({label} must have less than {max} characters)');

// add multiple rules at once (separate using [space][pipe][space])
$validator->add('title:Title', 'required | maxlength(255) | minlength(min=10)');

// add all your rules at once
$validator->add(array(
    'title:Title' => 'required | maxlength(100)({label} must have less than {max} characters)',
	'content:Content' => 'required',
	'source:Source' => 'website'
));

// add nested rules
$validator->add('recipients[*]:Recipients', 'email'); //all recipients must be valid email addresses
$validator->add('shipping_address[city]:City', 'MyApp\Validator\City'); // uses a custom validator to validate the shipping city
```

Links
-----

[](#links)

- [documentation](http://sirius.ro/php/sirius/validation/)
- [changelog](CHANGELOG.md)

Known issues
------------

[](#known-issues)

In PHP 5.3 there is some problem with the SplObject storage that prevents the library to remove validation rules. This means that in PHP 5.3, you cannot remove a validation rule from a `Validator` or `ValueValidator` object

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.7% 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 ~96 days

Total

4

Last Release

2276d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/08770ee5023c630d938775e347eb70c5d4978a25cb754f416dd4a0e6fdc7f021?d=identicon)[jsnoriegam](/maintainers/jsnoriegam)

---

Top Contributors

[![adrianmiu](https://avatars.githubusercontent.com/u/1293017?v=4)](https://github.com/adrianmiu "adrianmiu (75 commits)")[![jsnoriegam](https://avatars.githubusercontent.com/u/1829140?v=4)](https://github.com/jsnoriegam "jsnoriegam (14 commits)")[![eclipxe13](https://avatars.githubusercontent.com/u/1266852?v=4)](https://github.com/eclipxe13 "eclipxe13 (13 commits)")[![sergiobelya](https://avatars.githubusercontent.com/u/6141086?v=4)](https://github.com/sergiobelya "sergiobelya (7 commits)")[![Rhilip](https://avatars.githubusercontent.com/u/13842140?v=4)](https://github.com/Rhilip "Rhilip (5 commits)")[![gajus](https://avatars.githubusercontent.com/u/973543?v=4)](https://github.com/gajus "gajus (4 commits)")[![kenjis](https://avatars.githubusercontent.com/u/87955?v=4)](https://github.com/kenjis "kenjis (3 commits)")[![kulavvy](https://avatars.githubusercontent.com/u/47749939?v=4)](https://github.com/kulavvy "kulavvy (1 commits)")[![mickrip](https://avatars.githubusercontent.com/u/320334?v=4)](https://github.com/mickrip "mickrip (1 commits)")[![userlond](https://avatars.githubusercontent.com/u/7788670?v=4)](https://github.com/userlond "userlond (1 commits)")[![bradchesney79](https://avatars.githubusercontent.com/u/306802?v=4)](https://github.com/bradchesney79 "bradchesney79 (1 commits)")[![vikkio88](https://avatars.githubusercontent.com/u/248805?v=4)](https://github.com/vikkio88 "vikkio88 (1 commits)")[![everon](https://avatars.githubusercontent.com/u/375251?v=4)](https://github.com/everon "everon (1 commits)")[![filisko](https://avatars.githubusercontent.com/u/8798694?v=4)](https://github.com/filisko "filisko (1 commits)")[![gumacs92](https://avatars.githubusercontent.com/u/12608260?v=4)](https://github.com/gumacs92 "gumacs92 (1 commits)")[![amirkhiz](https://avatars.githubusercontent.com/u/8492686?v=4)](https://github.com/amirkhiz "amirkhiz (1 commits)")

---

Tags

validationsecurityformsanitizationmodeling

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/latinosoft-validation/health.svg)

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

###  Alternatives

[siriusphp/validation

Data validation library. Validate arrays, array objects, domain models etc using a simple API. Easily add your own validators on top of the already dozens built-in validation rules

181743.3k13](/packages/siriusphp-validation)[progsmile/request-validator

Simple PHP Request Validator

33113.3k1](/packages/progsmile-request-validator)[apy/jsfv-bundle

Symfony2 Javascript Form Validation Bundle with localisation support

92770.5k](/packages/apy-jsfv-bundle)[arondeparon/laravel-request-sanitizer

An easy to use request sanitizer that allows you to sanitize your form data before validating it.

112151.6k1](/packages/arondeparon-laravel-request-sanitizer)[olssonm/l5-zxcvbn

Implementation of the zxcvbn project by @dropbox for Laravel. Uses zxcvbn-php by @bjeavons.

28311.1k1](/packages/olssonm-l5-zxcvbn)[stroker/form

ZF2 module for extending forms with live clientside validation

4157.1k](/packages/stroker-form)

PHPackages © 2026

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