How To : Create Highly customizable yet simple form validation jquery plugin


Form validation is one of the most important aspect on any web application. More the form is secure more secure will be the application. So as to validate form using jquery , is really simple and can be highly customize.

.

Here is the DEMO how it looks.

How it works?

Simple, in this plugin we have to set three parameters for every required class. User can set his own class and define rule. Moreover , user can also set events onError and OnValid for a particular class thus giving user high customization, he/she can add their own effects , may be jquery animate() .

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
required : { //required is a class
	rule : function() {
             // define some rule
	},
        onError : function() {
             //do something on error
	},
	onValid : function() {
            // do something on valid
	}
}, 
.
.
.
.
.
.
someNewClass: { //someNewClass is a class
	rule : function() {
             // define some rule
	},
        onError : function() {
             //do something on error
	},
	onValid : function() {
            // do something on valid
	}
},
 
submitHandler : function() {
	//do something on submit form
	return false; //remove this line if you need to refresh page on valid form
}

.

Using this function I have created this DEMO

Cheers!

Recently Published

»

How to scroll to the top of a webpage using jQuery ?

If you are looking for an extraordinary method of smoothly scrolling ...

»

11 sources to gain perfect knowledge of html5 semantic tags

1. Html5tuts Html5tuts is a site dedicated to HTML5. Feel free to ...

»

How to move an element into another parent element using jQuery?

An important piece to the puzzle when coding with jQuery is that how ...

»

10 optionally Good WordPress Typography Plugins You could Opt For

It is not necessary that the person will follow the standard guide ...

»

8 creative 3d slider wordpress themes to keep your blog active

1. Display Display is a WordPress Theme best used for Portfolio and ...

»

11 quick remote screen sharing apps worth trying

1. Join Me Easy to start, easy to join, easy to manage, join.me takes ...

»

9 perfectly adsense optimized seo friendly responsive magazine wordpress themes

1. Simple Life SIMPLE LIFE is a WordPress responsive theme with a ...

»

9 out of the box jquery plugins not to miss

1. Hatchshow Hatchshow is a typesetting plugin for jQuery that ...

»

10 fresh libraries and web apps you can’t afford to miss

1. Pagekit Pagekit gives you the tools to create beautiful websites. ...