PHPackages                             ozanmuyes/paraveley - 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. ozanmuyes/paraveley

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

ozanmuyes/paraveley
===================

 Automatically generate Parsley rules depending on Laravel's FormRequest.

v0.2.0(10y ago)223MITPHPPHP &gt;=5.4.0

Since Aug 5Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ozanmuyes/paraveley)[ Packagist](https://packagist.org/packages/ozanmuyes/paraveley)[ RSS](/packages/ozanmuyes-paraveley/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

Paraveley
=========

[](#paraveley)

Automatically generate Parsley rules depending on Laravel 5's FormRequest.

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

[](#requirements)

- Laravel 5 and later
- Parsley 2

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

[](#installation)

You can install Paraveley by choosing any of the options below;

- Add following line to your `composer.json` file
    `"ozanmuyes/paraveley": "0.1.*"`
    and run `composer update` command on your CLI.
- Run `composer require "ozanmuyes/paraveley:0.1.*"` command on your CLI.

Usage
-----

[](#usage)

Add `Ozanmuyes\Paraveley\Traits\FormRequestExtractor;` just below `namespace` declaration and `use FormRequestExtractor;` trait on your Request class.

To retrieve array of Parsley rules for passing them to the view, simply call `$request->parsleyRules()` function.

See **Example** section for further usage information.

Example
-------

[](#example)

1. `CreateArticleFormRequest.php` file

    ```
