Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

homersimpsons/validate

Open more actions menu

Repository files navigation

Validate

A declarative validator

Easy to use

Validate's validators are easy to use and to extend.

They are all available as static functions under Validate\V, so they can be easily found.

Example

use Validate\V;

V::and(V::string(), V::minLength(5))('Hello'); // true

Extend

use Validate\V;

$notNull = static fn ($input): bool => $input !== null; // Equivalent to `V::not(V::null))`

$notNull(null); // false
V::not($notNull)(null); // true because it is not not null

Contribute

Feel free to add some common validation rules

Inspiration

I wanted to create a declarative validation library, so I looked around to see what did exist, so I came across v8n.

About

A declarative validator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.