PHPackages                             mouf/utils.common.validators - 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. mouf/utils.common.validators

ActiveMouf-library[Validation &amp; Sanitization](/categories/validation)

mouf/utils.common.validators
============================

This package contains typical validators to be used in your application. A validator is a class that decides whether a string is valid or not. For instance, you could use an EmailValidator to validate that a string is a mail, etc...

v3.1.0(11y ago)0163.9k11MITPHPPHP &gt;=5.3.0

Since Jan 29Pushed 11y ago2 watchersCompare

[ Source](https://github.com/thecodingmachine/utils.common.validators)[ Packagist](https://packagist.org/packages/mouf/utils.common.validators)[ Docs](https://github.com/thecodingmachine/utils.common.validators)[ RSS](/packages/mouf-utilscommonvalidators/feed)WikiDiscussions 3.1 Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (1)

Mouf validators
===============

[](#mouf-validators)

This package contains typical validators to be used in your application. A validator is a class that decides whether a string is valid or not and implements the `ValidatorInterface`.

The `ValidatorInterface` is part of this package.

For instance, you could use an `EmailValidator` to validate that a string is a mail, etc...

List of embedded validators
---------------------------

[](#list-of-embedded-validators)

- `RequiredValidator`: validates a value is not empty
- `NumericValidator`: validates a value is a number (optionnally an integer)
- `EmailValidator`: validates an email address
- `URLValidator`: validates a URL (starting with http://, https:// or ftp://)
- `MaxMinRangeValidator`: validates a value is between 2 bounds
- `MaxMinRangeLengthValidator`: validates a string length is between 2 bounds
- `SiretValidator`: validates a value is a valid SIRET number (French company id)

Javascript validation
---------------------

[](#javascript-validation)

If the validator implements the `JsValidatorInterface`, it provides the code to be run both in PHP and in Javascript. This means you can use this validator to generate Javascript code that validates any value.

I18n
----

[](#i18n)

The validators in the packet rely in [Fine](http://mouf-php.com/packages/mouf/utils.i18n.fine/README.md) for translating validation error messages.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75.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 ~246 days

Total

3

Last Release

4366d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104771?v=4)[mouf](/maintainers/mouf)[@Mouf](https://github.com/Mouf)

---

Top Contributors

[![vaidiep](https://avatars.githubusercontent.com/u/2227695?v=4)](https://github.com/vaidiep "vaidiep (22 commits)")[![nguyenk](https://avatars.githubusercontent.com/u/2227554?v=4)](https://github.com/nguyenk "nguyenk (3 commits)")[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (2 commits)")[![camkLcbr](https://avatars.githubusercontent.com/u/3781258?v=4)](https://github.com/camkLcbr "camkLcbr (1 commits)")[![isow](https://avatars.githubusercontent.com/u/2903627?v=4)](https://github.com/isow "isow (1 commits)")

---

Tags

validatorsutils

### Embed Badge

![Health badge](/badges/mouf-utilscommonvalidators/health.svg)

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

###  Alternatives

[bryglen/yii2-validators

credit card validation yii 2

1426.7k](/packages/bryglen-yii2-validators)

PHPackages © 2026

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