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

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

raoul/php-validator
===================

A simple validator for PHP

V1.1.0(3y ago)0321MITPHP

Since Feb 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/RaoulvanWijk/Validator)[ Packagist](https://packagist.org/packages/raoul/php-validator)[ RSS](/packages/raoul-php-validator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (1)

About my PHP Validator
======================

[](#about-my-php-validator)

How to install
--------------

[](#how-to-install)

```
composer require raoul/php-validator
```

Or

```
git clone https://github.com/RaoulvanWijk/Validator.git

```

How to use it?
--------------

[](#how-to-use-it)

To use my validator you can either instantiate the validator class

```
require_once __DIR__ .'/vendor/autoload.php';

use Raoul\Validator\Validator;

$validator = new Validator();
```

or create a new class that extends the base validator class

```
require_once __DIR__ .'/vendor/autoload.php';

use Raoul\Validator\Validator;

Class CustomValidator extends Validator
{
    public function rules()
    {
        return [
            // Your rules go here
        ];
    }

    public function messages()
    {
        return [
            // Your custom messages go here
        ];
    }
}

$validator = new CustomValidator();
```

And then call the validate method with the needed data

```
$validator->validate($data);
```

### Specifying the rules

[](#specifying-the-rules)

You have 2 options when specifying the rules when calling the validate method

```
$validator->validate($data, [
  'name' => ['required', 'min:4'],
  'email' => 'required|email'
  ]);
```

or in the rules() method

```
public function rules()
    {
        return [
            'name' => ['required', 'min:4'],
            'email' => 'required|email'
        ];
    }
```

### Specifying custom validation messages

[](#specifying-custom-validation-messages)

### available validation rules

[](#available-validation-rules)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

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 ~9 days

Total

2

Last Release

1169d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/689dc11738f4bf48182a351288ecdc0354cf6559ebb03a9c51bc216a8a96ada0?d=identicon)[RaoulvanWijk](/maintainers/RaoulvanWijk)

---

Top Contributors

[![RaoulvanWijk](https://avatars.githubusercontent.com/u/72564782?v=4)](https://github.com/RaoulvanWijk "RaoulvanWijk (26 commits)")

---

Tags

validatorvalidationvalidation libraryvalidation toolvalidation packagevalidation library for PHPvalidation tool for PHPvalidation package for PHP

### Embed Badge

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

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

###  Alternatives

[respect/validation

The most awesome validation engine ever created for PHP

5.9k37.4M383](/packages/respect-validation)[opis/json-schema

Json Schema Validator for PHP

64736.9M186](/packages/opis-json-schema)[vlucas/valitron

Simple, elegant, stand-alone validation library with NO dependencies

1.6k4.4M128](/packages/vlucas-valitron)[intervention/validation

Additional validation rules for the Laravel framework

6826.7M8](/packages/intervention-validation)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[wixel/gump

A fast, extensible &amp; stand-alone PHP input validation class that allows you to validate any data.

1.2k1.3M30](/packages/wixel-gump)

PHPackages © 2026

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