I am using the jQuery Validation plugin and I started grouping some of my fields together:
groups: { fullName: "myFirstName myLastName" },
I also added fields to the rules section so that they are checked:
rules: { myFirstName: { required: true }, myLastName: { required: true } },
This works fine and gives a "This field is required" error for the group.
My question is about custom error messages. I have the following setup:
messages: { fullName: "Please enter both your first name and your last name" }
Unfortunately, the user error is not displayed, only a general one.
Does anyone have any ideas?
javascript jquery jquery-validate validation messages
Richard L
source share