jquery plugins

jquery validater validating hidden field

var createUserValidator = $(“#create-user-form”).validate({
focusInvalid: true,
ignore: [],
rules: {
firstname: “required”,
lastname: “required”,
email: {
required: true,
email: true
},
confirmemail: {
required: true,
email: true,
equalTo: “#email”
},
password: {
required: true,
minlength: 6
},
confirmpassword: {
required: true,
equalTo: “#password”
},
terms: “required”,
industry: “required”
},

messages: {
firstname: “Please enter your first name”,
lastname: “Please enter your last name”,
email: “Please enter a valid email address”,
confirmemail: {
required: “Please enter a valid email address”,
equalTo: “Please enter the same email as above”
},
password: {
required: “Please provide a password”,
minlength: “Your password must be at least 6 characters long”
},
confirmpassword: {
required: “Please provide a password”,
minlength: “Your password must be at least 6 characters long”,
equalTo: “Please enter the same password as above”
},
terms : “Please agree to the Terms of Service”,
industry: “Please Select industry”
},

errorPlacement: function(error, element) { //custome error display

if(element.hasClass(‘custom-drop-down’)){
error.insertAfter($(element).parent());
$(element).parent().addClass(‘error’);
}
else if(element.hasClass(‘custom-checkbox’)){
error.insertAfter($(element).parent());
}
else{
error.insertAfter($(element));
}
}
});

  Like
By bm on February 13, 2014 | jquery plugins | A comment?

Remove file from plupload queue

  Like
By bm on February 6, 2014 | jquery plugins | A comment?