I have a form with html5 validation ("required", etc.) attributes attached.
Is there a way to trigger the appearance of the native validation bubbles/tooltips without simulating "click" on submit buttons of the form ?
I have a form with html5 validation ("required", etc.) attributes attached.
Is there a way to trigger the appearance of the native validation bubbles/tooltips without simulating "click" on submit buttons of the form ?
Share Improve this question asked Dec 5, 2012 at 8:48 lgersmanlgersman 2,2862 gold badges20 silver badges23 bronze badges 3- Some interesting discussion on whatwg on this - may be helpful. – Sasidhar Vanga Commented Dec 5, 2012 at 9:43
- Would like to know how to trigger it via javascript! – Gaʀʀʏ Commented Dec 7, 2012 at 3:47
- 1 My jquery.html5validation.js jquery plugin lets the current validation message appear automagically via the native title tooltip. Look at the bottom of the source file to see the trick. – lgersman Commented Jan 4, 2013 at 9:30
2 Answers
Reset to default 5As said in a ment, you can use the .reportValidity()
method. It is widely supported except for IE, as usual.
You just can't trigger the native browser form validation.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744785718a4593612.html
评论列表(0条)