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

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

magewirephp/validation
======================

PHP Laravel like standalone validation library (forked from rakit/validation)

1.0.0(7mo ago)4165.8k—9.8%2MITPHPPHP &gt;=8.1 &lt;8.5CI passing

Since Oct 15Pushed 7mo agoCompare

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

READMEChangelog (1)Dependencies (3)Versions (3)Used By (2)

Magewire PHP - Standalone Validation Library
============================================

[](#magewire-php---standalone-validation-library)

> **⚠️ Fork:** This package is a fork and drop-in replacement of [rakit/validation](https://github.com/rakit/validation) (it continues to use the original `Rakit\Validation` namespace). Thanks to the original authors for their great work.

[![CI](https://github.com/magewirephp/validation/actions/workflows/ci.yml/badge.svg)](https://github.com/magewirephp/validation/actions/workflows/ci.yml)[![License](https://camo.githubusercontent.com/3c85a37d243cf1b5b32c038a2b51f7fbf5ca06fdfc43c631b894686c4778e953/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d616765776972657068702f76616c69646174696f6e)](https://github.com/magewirephp/validation/blob/main/LICENSE.md)

PHP Standalone library for validating data. Forked from `rakit/validation` which was inspired by `Illuminate\Validation` Laravel.

Features
--------

[](#features)

- API like Laravel validation.
- Array validation.
- `$_FILES` validation with multiple file support.
- Custom attribute aliases.
- Custom validation messages.
- Custom rule.

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

[](#requirements)

- PHP 8.1 - 8.4
- Composer for installation

Quick Start
-----------

[](#quick-start)

### Installation

[](#installation)

```
composer require "magewirephp/validation"

```

### Usage

[](#usage)

There are two ways to validating data with this library. Using `make` to make validation object, then validate it using `validate`. Or just use `validate`. Examples:

Using `make`:

```
