madnh/laravel-parsley

There is no license information available for the latest version (v0.4.7) of this package.

Converts FormRequest rules to Parsley rules

v0.4.7 2017-05-17 09:56 UTC

This package is not auto-updated.

Last update: 2024-11-23 20:36:54 UTC


README

Converts FormRequest rules to Parsley rules.

Install

If you have previously set up LaravelCollective/Html or Illuminate/Html you can remove its service provider from app/config

in app/config add the following under service providers:

HappyDemon\LaravelParsley\LaravelParsleyServiceProvider

If you haven't already, add these facades:

'Form' => 'Collective\Html\FormFacade',
'Html' => 'Collective\Html\HtmlFacade',

Useage

All that's needed is for you to supply the name of the FormRequest in the request key when opening a form.

Form::open(['request' => 'YourFormRequestClass'])
Form::model(['request' => 'YourFormRequestClass'])

Lastly you should include parsley's scripts on the page and activate parsley for your form.

easy enough don't you think?

Validation rules