TrustButVerify - simple jQuery validation powered by LiveValidation

I really like the way LiveValidation runs; however, I REALLY LOVE jQuery selectors & chaining. Unfortunately the LiveValidation approach to validation doesn't feel right when looking at a lot of field-specific validators surrounded by super terse jQuery syntax.

So I decided to make a small 79-line wrapper-type of plugin that is powered by LiveValidation but comes with all the power of jQuery's selectors, chaining and... well, jQuery.

I called the plugin, TrustButVerify. Check it out & let me know your thoughts or if there is room for improvement (which there definitely is).

I have NOT exposed all of the LiveValidation methods; just the ones I found useful & necessary :-p

Here's a sample of some validation:


$(document).ready(function(){
$('#form .required').required();
$('#email').validEmail();
$('#zip').matches(/^\d{5}$/);
$('input.address').required().validate(someCustomFunction, 'your address is out of our area ');
});

Comments

Anonymous said…
This comment has been removed by a blog administrator.

Popular posts from this blog

Require comment / message on all SVN commits for Visual SVN Server

Fluent NHibernate - Incorrect syntax near the keyword 'Group'

Deleting Cookies (or Managing Cookie Domains) in ASP.NET