I'm trying to use inline/static
error messages with jquery.validate
- as in not-auto-generated:
<p>
<label for="name">Name</label>
<input type="text" id="name_input" name="name" required="required" data-message="we'd like to know your name" />
<div for="name_input" class="error"><div class="arrow_tip_left"></div>did you forget your name?</div>
</p>
<p>
<label for="email">Email</label>
<input type="email" id="email_input" name="email" prompt="your email address" class="email" required="required" data-message="please enter a valid email address" />
<div for="email_input" class="error"><div class="arrow_tip_left"></div>please enter a valid email</div>
</p>
How do I get .validate()
to use the existing error messages rather than crea开发者_StackOverflowting new ones?
Cheers!
Well then it seems you dont need jquery validate. In jquery (not jquery validate) you can use onblur, onchange and show your static error message when field is empty, not correct email address etc.
精彩评论