I'm working with JQuery validation plugin to validate a mail-adress.
rules: {
mail_person: {
required: true,
email: true
}
},
messages: {
mail_person: {
required: "Mail required",
email: "Mail invalid"
}
},
Problem is: If the input is empty and the submit button is clicked, the error message is "input is requiered". When I start typing into the mail-input field, the message should change to "invalid mail" but it doesn't.
And the other way round: if the input is invalid and the submit button is clicked, the correct message "input invalid" occures, but does not change to "input is required" when the input is deleted.
Here is a plunker