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

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

fzed51/validator
================

Systeme de validation de donnees

v1.0.1(8y ago)09MITPHPPHP &gt;=7.1.0

Since Oct 25Pushed 8y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

validator
=========

[](#validator)

Systeme de validation de donnees

Installation
------------

[](#installation)

```
composer require fzed51/validator

```

Utilisation
-----------

[](#utilisation)

### Constructeur

[](#constructeur)

```
use Fzed51\Validator\Validator;
$v = new Validator($data);
```

Passer en paramètre du constructeur les données à valider. `$data` peut être un tableau ou un objet.

### getErrors

[](#geterrors)

Retourne un tableau d'érreurs

### isValide

[](#isvalide)

Retourne un bouléen indiquant si la validation c'est bien passé.

### required

[](#required)

```
$v->required('nom','prenom');
```

Vérifie que les données nom et prenom sont présentes.

### notEmpty

[](#notempty)

```
$v->notEmpty('nom','prenom');
```

Vérifie que les données nom et prenom sont présent et non vide.

### slug

[](#slug)

```
$v->slug('slug');
```

Vérifie que la donnée slug est bien un slug. C'est à dire une chaine contenant des a à z, A à Z, 0 à 9 et - avec 2 - ne pouvant pas se suivre.

### betweenLength

[](#betweenlength)

```
$v->betweenLength(4, 64, 'login', 'nom');
```

Vérifie que les données age et nom sont &gt;= 4 caractères et &lt;= 64 caractères.

### maxLength

[](#maxlength)

```
$v->maxLength(1024, 'comment');
```

vérifie que la donnée comment est &lt;= 1024 caractères.

### minLength

[](#minlength)

```
$v->minLength(8, 'pass');
```

vérifie que la donnée pass est &gt;= 8 caractères.

### dateTime

[](#datetime)

```
$v->dateTime('debut', 'fin');
```

Vérifie que les données debut et fin sont bien des instant au format 'AAAAMMJJ HHMMSS'

### date

[](#date)

```
$v->dateTime('anniv');
```

Vérifie que la donnée aniv est bien une date au format 'AAAAMMJJ'

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3123d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b6a8b19c5e90c6de2bc25cb56516bc0bf6cd4fa8eee97ee3a762b11180a0362?d=identicon)[fzed51](/maintainers/fzed51)

---

Top Contributors

[![fzed51](https://avatars.githubusercontent.com/u/1201984?v=4)](https://github.com/fzed51 "fzed51 (6 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/fzed51-validator/health.svg)](https://phpackages.com/packages/fzed51-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)
