-
-
Notifications
You must be signed in to change notification settings - Fork 174
Basic Usage
albertmoreno edited this page Aug 10, 2015
·
47 revisions
Laravel Javascript Validation ships with a simple, convenient facility for configuring rules error messages via the JsValidator Facade.
When the instance is printed in a view the Javascript code needed to validate your form is rendered to the page.
To create validator you can use Laravel validation rules or defined Form Request
- Rulesets
- [Form Request] (Form-Request)
Is possible disabe javascript validation for certain fields. To do that you have to add no_js_validation
to fields rules.
$rules=array(
'name' =>'required',
'phone' => 'numeric|no_js_validation'
);
In this example the field phone
wont be validated with Javascript