I am new to JQuery and am using the JQuery validation plugin.
I would like to ask, how to override the default messages to display also text in label associated with form element.
I would get message something like this:
Field Password is required. instead of default This field is required.
Field PostCode must contain at least 3 characters. instead of default Please enter at least 3 characters.
I need to override the default behaviour of this plugin, because I do not want to specify custom message for each item for every type of validation.
Is it possible?
$("#signupform")
.validate({
rules: {
password: "required",
postcode: {
required: true,
minlength: 3
}
},
messages: {
password: "Field Password is required",
postcode: {
required: "Field PostCode is required",
minlength: "Field PostCode must contain at least 3 characters"
}
});