-
-
Notifications
You must be signed in to change notification settings - Fork 174
Configuration
The package works out of box with default settings if you are using Bootstrap
When the JsValidator
is rendered withud specify selector
or view
, this values are loaded from package config.
You can customize some options modifying the config/jsvalidation.php
file
/**
* Default view used to render Javascript validation code
*/
'view' => 'jsvalidation::bootstrap',
/**
* Default JQuery selector find the form to be validated.
* By default, the validations are applied to all forms.
*/
'form_selector' => 'form',
The view
parameter specifies the view that will be loaded by default when the validator is rendered. This view is responsive to generate
the javascript needed to validate the form. By default, Bootstrap compatible view is provided. In any case you can can customize this view or create new one.
The form_selector
parameter specifies the default jQuery selector used to find the form element to validate. By default, form is selected, so
the validations will be applied to all forms present in HTML page