How to use

Copy-paste the following <script> near the end of your pages under JS Implementing Plugins to enable it.

              
                <script src="../assets/vendor/jquery-validation/dist/jquery.validate.min.js"></script>
              
            

Copy-paste the following <script> near the end of your pages under JS Front to enable it.

              
              
            

Copy-paste the init function under JS Plugins Init., before the closing </body> tag, to enable it.

              
                <script>
                  $(document).on('ready', function () {
                    // initialization of form validation
                    $('.js-validate').each(function() {
                      $.HSCore.components.HSValidation.init($(this));
                    });
                  });
                </script>
              
            

Example

Validation types

Advanced types

Methods

Parameters Description
data-validate-state By deafult .is-valid and .is-invalid classes added to <input> or <select> tags. Adding this attribute to .js-form-message class or inside .js-form-message class children element, will determine where the .is-valid and .is-invalid classes will be added.