Tech blog to share information.

October 17, 2015

Part 1 : Getting Started with Jquery Validation Plugin

October 17, 2015 Posted by tj cool , No comments


This jQuery plugin makes clientside form validation simple, effective and easy. It makes a good choice for scratch application as well as when you’re trying to integrate something into an existing application with lots of existing markups. Jquery validation comes with a pre-defined set of validation at the same time developer can easily extend or introduces new validations.

For the latest stable release of jquery visit: Jquery CDN

Getting Started 

Add a reference to jquery and jquery validation plugin. To get latest URI of validation plugin visit: JSCDN.
For the demo, I am referring following URI

Initializing Jquery Validation

Method-  .validate() 

The validate method returns a Validator object that has a few public methods that you can use to trigger validation programmatically.
Syntax :

        $("#formname").validate();
    

Writing Basic form Validation

To demonstrate jquery validation, below is the sample form. This form contains single required input field.



0 comments: