PHPackages                             longdinhh/validation - 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. longdinhh/validation

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

longdinhh/validation
====================

A re-write of rakit/validation providing Laravel like validation as a standalone library

v1.1.0(3y ago)014.2k↑216.7%MITPHPPHP &gt;=7.2

Since May 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/LongDinhh/validation)[ Packagist](https://packagist.org/packages/longdinhh/validation)[ RSS](/packages/longdinhh-validation/feed)WikiDiscussions main Synced 1mo ago

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

Validation
==========

[](#validation)

This is a re-write of [rakit/validation](https://github.com/rakit/validation), a standalone validator like Laravel Validation. In keeping with rakit/validation, this library does not have any other dependencies for usage.

Please note that the internal API is substantially different to rakit/validation.

Jump to [rules](#available-rules)

Requirements
------------

[](#requirements)

- PHP 7.2+
- ext/mb-string

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

[](#installation)

Install using composer, or checkout / pull the files from github.com.

- composer require longdinhh/validation

Usage
-----

[](#usage)

There are two ways for validating data with this library: using `make` to make a validation object, then validate it using `validate`; or use `validate`.

For example:

Using `make`:

```
