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 Show Related Posts in WordPress Without a Plugin?

Making your visitors go through each post increases the browsing time ...

»

Noteworthy Facts About Android App Piracy and How It Can Be Dealt With

Are you a gaming aficionado, and obsessed with gaming apps? Do you ...

»

4 Great Ways to Turn Your Images into SEO Tools

Photos on a website help us to understand the website much more ...

»

8 Search Form Tutorials Built With CSS3, jQuery & HTML5

Elevate the power of search by adding search functionality or search ...

»

10 Best HTML5 Frameworks For Hybrid App Development

Hybrid apps are generally built around native web view container or ...

»

A Look at The Evolution Of WordPress and What Future Holds For It

When it comes to developing a website, WordPress is the first name ...

»

7 WordPress Plugins That Make Your Site Mobile Responsive

Not much in the recent past, having a responsive website that works ...

»

Things you should Consider When You Are Designing an E-commerce Website

The people of today’s generation have discovered the various ...

»

Developing a Mobile App Using Open Source Software? Consider These Tips For Security

Today, almost every IT organization (including the Fortune 500 ...