PHPackages                             oriatec/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. [HTTP &amp; Networking](/categories/http)
4. /
5. oriatec/validation

ActiveLibrary[HTTP &amp; Networking](/categories/http)

oriatec/validation
==================

A re-write of somnambulist/validation providing Laravel like validation, psr-7 compliant, as a standalone library

1.4.1(4y ago)08MITPHPPHP &gt;=8.0

Since Dec 9Pushed 4y agoCompare

[ Source](https://github.com/ORIATEC/validation)[ Packagist](https://packagist.org/packages/oriatec/validation)[ RSS](/packages/oriatec-validation/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (5)Versions (9)Used By (0)

Somnambulist Validation
=======================

[](#somnambulist-validation)

[![GitHub Actions Build Status](https://camo.githubusercontent.com/149fcf7e30eb47c62138a167dff663400f5f5a605ced04f0fa533e38cd3748be/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6f7269617465632f76616c69646174696f6e2f74657374733f6c6f676f3d676974687562)](https://github.com/oriatec/validation/actions?query=workflow%3Atests)[![Issues](https://camo.githubusercontent.com/da13d2ec919875964387e8e280cd96d23d5439128788545d196bae65a0410a7d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6f7269617465632f76616c69646174696f6e3f6c6f676f3d676974687562)](https://github.com/oriatec/validation/issues)[![License](https://camo.githubusercontent.com/b2bb50e7d312b0fed2e5aa297d7d85e9e2ccde9d2e053b6668ea91cfb4f23002/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f7269617465632f76616c69646174696f6e3f6c6f676f3d676974687562)](https://github.com/oriatec/validation/blob/master/LICENSE)[![PHP Version](https://camo.githubusercontent.com/b2475e6a5431444b822b681e63c7a0ac57ef483929cf09d499d1172ef0ab7434/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6f7269617465632f76616c69646174696f6e3f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/oriatec/validation)[![Current Version](https://camo.githubusercontent.com/a2b1c6db56549c8a607ef5f3cb0c8aaaf063cf8b727c6d3c63d77d682bebab28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f7269617465632f76616c69646174696f6e3f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/oriatec/validation)

This is a fork of [somnambulist/validation](https://github.com/somnambulist-tech/validation), a standalone validator like Laravel Validation.

Originaly, this package is a rewrite of [rakit/validation](https://github.com/rakit/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.

This fork add a compliance of PSR-7, especially UploadedFileInterface.

Jump to [rules](#available-rules)

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

[](#requirements)

- PHP 8.0+
- ext/mb-string
- php-fig/http-message

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

[](#installation)

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

- composer require oriatec/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`:

```
