Re: triggering contextual error message for inputs

Mounir Lamouri <[email protected]> Sun, 18 Mar 2012 18:31:50 +0100
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
First of all, sorry for the quite late reply...

On 02/09/2012 04:14 PM, Da Scritch wrote:
> How can I trigger the browser (firefox, chrome, etc...) to display
> their standard contextual error-message ?

Unfortunately, you can't really do that. form.submit() will by-pass the
form validation check. The only way to trigger the form validation check
is when the user tries to submit the form. IIRC, there was a discussion
on whatwg about adding a way to trigger the browser's form validation
check (and the UI) but I can't find it...

Cheers,
--
Mounir