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

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

laracasts/validation
====================

Easy validation for Laravel applications.

1.3(11y ago)147190.3k↑102.4%37[10 issues](https://github.com/laracasts/Validation/issues)[5 PRs](https://github.com/laracasts/Validation/pulls)4MITPHPPHP &gt;=5.4.0

Since Apr 30Pushed 11y ago15 watchersCompare

[ Source](https://github.com/laracasts/Validation)[ Packagist](https://packagist.org/packages/laracasts/validation)[ RSS](/packages/laracasts-validation/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (11)Used By (4)

> If you are using Laravel 5.0, this package is unnecessary. Instead, leverage the new form request classes to perform your validation.

Install With Composer
---------------------

[](#install-with-composer)

```
"require": {
    "laracasts/validation": "~1.0"
}
```

And then, if using Laravel (not required), add the service provider to `app/config/app.php` in the `providers` array.

```
'Laracasts\Validation\ValidationServiceProvider'
```

Usage
-----

[](#usage)

Here's an example. Imagine that you need validation for a login form. First, create an object to contain the necessary rules:

```
