jQuery Validation Custom Message Before Listing Errors
- by Michael
I am looking to add a custom message before listing my errors for a login page:
"Oops, you forgot to enter the following:" + "Username", "Password" (if both not entered)
or
"Oops, you forgot to enter the following:" + "Username" (if just username not entered)
$(document).ready(function(){
$("#loginForm").validate({
errorLabelContainer: $('#RegisterErrors'),
messages: {
username: "Username",
password: "Password"
}
});
});
With this in my HTML
<div id="RegisterErrors">