Trigger the HTML5 Validation error to become visible on an event using
jQuery/Javascript
I'm not using a "submit" button in my form. I'm using an anchor and with
that an onclick event. If I use submit button, I can see the HTML5
validation error on textbox. But I'm unable to make that error visible
using javascript or jquery.
Please help me, How can I make HTML5 validation error to become visible
using jquery/Javascript.
I'm looking for something like this
if(an input field is not valid){
html5_error_message.show(); //the error should show on that particular
input field
}
An important point is that I'm trying to validate my input fields without
submitting my form.
No comments:
Post a Comment