Package Data | |
---|---|
Maintainer Username: | minkbear |
Maintainer Contact: | albert@memorylimit.net (Albert Moreno) |
Package Create Date: | 2016-11-23 |
Package Last Update: | 2016-11-23 |
Home Page: | http://laravel-jsvalidation.memorylimit.net/ |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-23 03:17:44 |
Package Statistics | |
---|---|
Total Downloads: | 503 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Laravel Javascript Validation package allows to reuse your Laravel Validation Rules, Messages, FormRequest and Validators to validate forms automatically in client side without need to write any Javascript code or use HTML Builder Class.
You can validate forms automatically referencing it to your defined validations. The messages are loaded from your validations and translated according your Localization preferences.
Almost all Validation Rules provided by Laravel and other packages are supported.
Almost are validated in client-side using Javascript, but in some cases, the validation should to be done in server-side via AJAX:
Some Laravel features and validations are not implemented yet. Pull Requests are welcome!
The easiest way to create Javascript validations is using Laravel Form Request Validation.
Follow the Installation Guide to install the package. The default config shlould work out-of-box
Call JsValidator Facade in your view to validate any FormRequest
<form>
<!-- ... My form stuff ... -->
<form>
<!-- Javascript Requirements -->
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>
<!-- Laravel Javascript Validation -->
<script type="text/javascript" src="{{ asset('vendor/jsvalidation/js/jsvalidation.js')}}"></script>
{!! JsValidator::formRequest('App\Http\Requests\MyFormRequest') !!}
Take a look to Basic Usage or Examples to get more information.
To get more info refer to Project Wiki
The MIT License (MIT). Please see License File for more information.