Guardian is a all-purpose form validation jQuery plugin. It was designed to be flexible and easy to extend to meet any need.
$('#example1').guardian();
$('#example1').guardian();
$('#example3').guardian();
$('#example4').guardian({
//Display the number of invalid fields on submit
failure: function() {
this.$el.prepend('There are '+this.getInvalid().length+' invalid fields');
},
//Disable inputs validating on blur
extend: function() {
var $this = this;
$this.$el.off('change blur', ':input', $this.onBlur);
}
});