Using JQuery Validate, I can set easily messages when something goes wrong:
<input class="required" id="pwd" name="pwd" type="password" title="ERROR here" />
How can I make this the default message when there is no error and set another message when there is an error? Example:
<input class="required" id="pwd" name="pwd" type="password" title="Write your password" />
....
$('#form').validate({
rules: {
pwd: {
SET MESSAGE IF ERROR
}
}
});
Edit: I'll try to explain better: I need first no message, when the user sets focus to an input I want to show a "status" message (like "Write your password") and last, if the text is wrong, show an error message (like "enter more than 8 characters").