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

ActiveInput-validator[Validation &amp; Sanitization](/categories/validation)

wies/input-validator
====================

Input validator for checking form data and individual input.

012[1 issues](https://github.com/cxzzy/input-validator/issues)PHP

Since Mar 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/cxzzy/input-validator)[ Packagist](https://packagist.org/packages/wies/input-validator)[ RSS](/packages/wies-input-validator/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

input-validator
===============

[](#input-validator)

Validate input in PHP and JavaScript

Run: composer require wies/input-validator:dev-master

1. Validation rules
===================

[](#1-validation-rules)

Validation rules as an array for post data. The key is the field name the value are the rules separated by a pipe.

```
$validation->validate(array(
    'email' => 'required|email',
    'phone_number' => 'required|min:5',
    'first_name' => 'required',
    'last_name' => 'required',
    'password' => 'required|min:5',
    'repeat_password' => 'same:password'
));
```

2. Check for errors
===================

[](#2-check-for-errors)

```
if (!$validation->hasErrors()) {
  echo 'There are validation errors.';
}
```

3. Display errors
=================

[](#3-display-errors)

```
$errors->first('email', 'E-mail is required');
```

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 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://avatars.githubusercontent.com/u/1228272?v=4)[Wies](/maintainers/cxzzy)[@cxzzy](https://github.com/cxzzy)

---

Top Contributors

[![cxzzy](https://avatars.githubusercontent.com/u/1228272?v=4)](https://github.com/cxzzy "cxzzy (21 commits)")

### Embed Badge

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

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

###  Alternatives

[marcosh/php-validation-dsl

A DSL for validating data in a functional fashion

483.9k](/packages/marcosh-php-validation-dsl)

PHPackages © 2026

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