I am using jquery validation plugin with php on ubuntu.
I apply validation for my forms as follows:
$(obj).find("form").validate();
When I set "email" as the class of any text field, and I give it the wrong email address, it shows the following error.
Please enter a valid email address.
Question: The message above is very long and will damage the alignment of my form and table. I want to use very short messages like this.
required
invalid email
invalid phone number
etc.
I tried this, but it shows its own messages, not mine.
$(obj).find("form").validate({
messages: {
required: "Required.",
email: "Invalid email",
url: "Invalid URL."
}
});
Can someone tell me how to do this? What is the exact code. The option "Messages" does not work for me. Thanks