Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/happydemon/laravel-parsley
Converts FormRequest rules to Parsley rules
https://github.com/happydemon/laravel-parsley
Last synced: 3 months ago
JSON representation
Converts FormRequest rules to Parsley rules
- Host: GitHub
- URL: https://github.com/happydemon/laravel-parsley
- Owner: happyDemon
- Created: 2015-06-27T20:07:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-07T19:28:27.000Z (over 9 years ago)
- Last Synced: 2024-05-06T06:43:48.238Z (8 months ago)
- Language: PHP
- Homepage: https://packagist.org/packages/happydemon/laravel-parsley
- Size: 174 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
laravel-parsley
===============Converts [FormRequest](http://laravel.com/docs/5.0/validation#form-request-validation) rules to [Parsley](http://parsleyjs.org/) 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',
## UseageAll 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
Implemented| Not implemented |
-----------|-----------------|
required | accepted |
email | after:(date) |
min | before:(date) |
max | before:(date) |
between | date_format |
integer | different |
url | in |
alpha_num | not_in |
alpha_dash| ip_address |
alpha | |
regex | |
confirmed | |