Skip to content

Configuration

albertmoreno edited this page Mar 16, 2015 · 18 revisions

The package works out of box with default settings if you are using Bootstrap

When the JsValidator is rendered withud specify selectoror 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',

view parameter

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. You can can customize this view or create new one.

form_selector parameter

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

Clone this wiki locally