PHPackages                             azi/envalid - 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. azi/envalid

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

azi/envalid
===========

Server side data/form validation library

1.0.2(8y ago)242026MITPHPPHP &gt;=5.4CI failing

Since Apr 1Pushed 3y ago6 watchersCompare

[ Source](https://github.com/azeemhassni/envalid)[ Packagist](https://packagist.org/packages/azi/envalid)[ RSS](/packages/azi-envalid/feed)WikiDiscussions master Synced 2d ago

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

Envalid
=======

[](#envalid)

**Envalid** is a framework agnostic and fluent server side form validation package for PHP

[![Build Status](https://camo.githubusercontent.com/e64664123bbfeb8f3ef2c1935d5e682cf32d5bad5e2f47c91269c05d7b41cf18/68747470733a2f2f7472617669732d63692e6f72672f617a65656d686173736e692f656e76616c69642e7376673f6272616e63683d6d61737465722676657273696f6e3d302e302e31)](https://travis-ci.org/azeemhassni/envalid)

[Documentation](http://envalid.azeemhassni.com/docs.html)
=========================================================

[](#documentation)

Installation
============

[](#installation)

Envalid can be installed via `composer` just execute the following command in your project root

`composer require azi/envalid`

Or add the following in your composer.json file and run `composer install`

```
"require": {
    "azi/envalid": "^1.0"
}

```

Usage
=====

[](#usage)

Using envalid in your project is super simple, here is an example

```
$validator = new azi\Validator();
$validator->validate($_POST, [
    'username'         => 'required',
    'password'         => 'required|password:strong',
    'confirm_password' => 'required|same:password'
]);
```

If you've files to validate you will need to merge `$_POST|$_GET` and with `$_FILES` just like the following

```
$validator = new azi\Validator();
$validator->validate(array_merge($_POST, $_FILES), [
    'profile_picture' => 'file:image'
]);
```

Available Rules
===============

[](#available-rules)

- required
- email
- password `Accepts password strength like password:strong|medium|normal (default noraml)`
- number
- file `Accepts file type currently supported formats: image,video,doc`
- min
- max
- length
- array
- boolean
- ip
- same
- alpha
- alnum

Contributions
=============

[](#contributions)

This repository is maintained by [@azeemhassni](https://github.com/azeemhassni)

If you can contribute I'd love to merge your PR and your name will be mentioned in the release notes and contributors list.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

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

Every ~53 days

Total

4

Last Release

3216d ago

Major Versions

0.1-beta → 1.02017-04-08

### Community

Maintainers

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

---

Top Contributors

[![azeemhassni](https://avatars.githubusercontent.com/u/6503258?v=4)](https://github.com/azeemhassni "azeemhassni (31 commits)")[![rizwanellahi](https://avatars.githubusercontent.com/u/12427458?v=4)](https://github.com/rizwanellahi "rizwanellahi (2 commits)")

---

Tags

form-validationlaravel-likephpserversidevalidation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/azi-envalid/health.svg)

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

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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