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

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

ir0ny1/validator
================

PHP Validator inspired by Illuminate Framework

07PHP

Since Oct 21Pushed 10y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/e1836fcf485338c870ef2dba199b93247ed69e1ff7b9a01b6ef68306c9100dce/68747470733a2f2f7472617669732d63692e6f72672f6972306e79312f76616c696461746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ir0ny1/validator)[![Code Climate](https://camo.githubusercontent.com/694f1e16bbd97db8dda9f080f79c10cc4eb21c5728936a93927defd889ee5efd/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6972306e79312f76616c696461746f722f6261646765732f6770612e737667)](https://codeclimate.com/github/ir0ny1/validator)[![Test Coverage](https://camo.githubusercontent.com/735ed31c3378e1c698487d75dfa0ae2d2cd2a5eb0ffbc85c307874602cd204c0/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6972306e79312f76616c696461746f722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/ir0ny1/validator/coverage)\#Validation Helper Written By Dave Richer ##For Course: CST8257 Web Application Development ###Release Date: October 17th 2015 ###Version: 1.0.0

\####Current Valid rules:

RuleDescriptionrequiredField is requiredsameAs:propertyField is same has propertyminLength:numberField is at least number characters longmaxLength:numberField is not longer then number characters longequalTo:valueField Equals ValuephoneNumberField is in (NNN) NNN-NNNN formatpostalCodeField is in A0A0A0 or A0A 0A0 formatemailAddressField is a valid email addresscomplexPasswordField is a complex password with 1 capital, 1 lowercase, 1 numeric, 1 special character and a minimum of six characters long\####Example:

```
$rules = [
    "name"  =>  "required:min:6"
];

$data = [
    "name"  =>  "Dave"
];

// Set the data and rules when creating the object
$val = new Validator($data, $rules);
// Or after..
$val->setData($data);
$val->setRules($rules);
// Or chain
$val->setData($data)->setRules($rules);

// Either validate with the validate method
$val->validate();
// Or validate by invoking the object itself
$val();

if (!val->valid()) {
    echo $val->validationMessageFor("name");
}
```

\####Would Produce Name must be at least six characters long

```
$val->validationSummary();

```

Will return an array of all validation messages

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/06fd9cdc9223f6738f74db17600a4b1425e52f8720dce646ac28ba0bb440b12d?d=identicon)[ir0ny1](/maintainers/ir0ny1)

---

Top Contributors

[![davericher](https://avatars.githubusercontent.com/u/6945951?v=4)](https://github.com/davericher "davericher (18 commits)")

### Embed Badge

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

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

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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