• MODX.com

    12 downloads

jqueryValidate

jqueryValidate is an extra by ifusiontt, first released on 2019-12-17.

Package Description

## About jqueryValidate acts as a wrapper for jquery validate (https://jqueryvalidation.org/) and is used to perform frontend form validation ## Usage ``` ``` #### SNIPPET PARAMETERS * htmlElement - the html element to attach Jquery Validate - (default) #contactForm. You can use a dot before the element to target classes * tpl - is a chunk used to build a javascript object of all Jquery Validate properties for example, rules, custom error messages etc. * See all jquery validate Options here https://jqueryvalidation.org/validate/ * (default) tpl chunk is tpl.jqueryValidate.jsOptions * You should duplicate the tpl.jqueryValidate.jsOptions chunk (see code below) and create your own validation rules. The default Tpl has the following built in rules for first_name, last_name, email and message. as seen in rules below. These rules would apply to form elements with the correponding names * install_jquery - If you have not installed jquery in your project, you can set this option to 1 to install this dependency. (default) - 0 * jquery_version - Specify the version of jQuery. (default) - 2.2.4 * jvalidate_version - Specify the version of Jquery Validate. (default) - 1.16.0 ``` ##### tpl.jqueryValidate.jsOptions Tpl { errorPlacement: function(error, element) { error.insertBefore(element); }, errorClass: "error", errorElement: "div", rules: { first_name: "required", last_name: "required", email: { required: true, email: true }, message: "required" }, messages: { first_name: "Please enter your First Name", last_name: "Please enter your Last Name", email: "Please enter a valid email", message: "The message is required" } } ``` Complete Documentation can be found [https://github.com/ifusiontt/jqueryValidate](https://github.com/ifusiontt/jqueryValidate)

Usage/Installation Instructions

## Quick start * Download the latest version of the transport file from the _packages directory in this repository ([https://github.com/ifusiontt/jqueryValidate](https://github.com/ifusiontt/jqueryValidate)). * Upload to your Modx core/packages directory * Search locally for package from Modx Package Manager and Install. * Alternatively you can download from packgage manager

Details

Developer(s)
ifusiontt
Released
2019-12-27
First seen
2019-12-17
License
GPLv2
Supported databases
MySQL
Minimum MODX Requirement
2.3

jqueryValidate Releases

Vendor Signature Released on
MODX.com 1.0.5.2-pl 2019-12-27 (1 month ago)