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">
I guess my question is more "how do you separate the errors by commas?" I want to keep the errors on one line and separate them by commas, not in a list form with bullets? Can you use the wrapper attribute?
Output on HTML: Error 1, Error 2 (if both missing) Error 1 (if just 1 is missing) Error 2 (if just 2 is missing)