<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>16051</bug_id>
          
          <creation_ts>2012-02-21 08:18:08 +0000</creation_ts>
          <short_desc>Triggering contextual error message for inputs</short_desc>
          <delta_ts>2015-06-26 05:36:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Xavier Mouton-Dubosc">xaviermd</reporter>
          <assigned_to name="Robin Berjon">robin</assigned_to>
          <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64354</commentid>
    <comment_count>0</comment_count>
    <who name="Xavier Mouton-Dubosc">xaviermd</who>
    <bug_when>2012-02-21 08:18:08 +0000</bug_when>
    <thetext>Hi everyone

I&apos;m actually dev&apos;ing on a intranet application in HTML5 with XHR (so
sorry, but i can&apos;t give access to any example). You can see a test there : http://jsfiddle.net/bz88V/

For a &lt;form&gt; I wish on make an XHR, I test the validity of the form,
like this :

if (form.checkValidity())
{
  $.post([...]);
} else {

   errormessages();

}

on the same way, into the return of the post (the [...] part), i can
have error validating messages from the server. So I attach them to
the inpts like this :
input.setCustomValidity(le_error_message);
le_error_message is really attached as I can see into
input.validationMessage
the :invalid css selector is set to the input but...

How can I trigger the browser (firefox, chrome, etc...) to display
their standard contextual error-message ?

I tried form.submit(), but it will really submit the form, even
skipping what I wish the browser should do.
I can&apos;t see any reference to that, nor into inspecting &lt;input&gt;
and &lt;form&gt; elements.


French speaking paper http://dascritch.net/post/2012/02/21/Validations-complexes-de-HTML5-farcies-au-Javascript

Sorry my french.
Xavier Mouton-Dubosc
  http://Dascritch.com
  @dascritch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70123</commentid>
    <comment_count>1</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 06:56:03 +0000</bug_when>
    <thetext>This bug was cloned to create bug 17826 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76898</commentid>
    <comment_count>2</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2012-10-22 10:59:42 +0000</bug_when>
    <thetext>Hixie responded to the upstream clone of this bug:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17826#c1

Xavier, can you please reply here to confirm whether you&apos;re satisfied with that response.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76899</commentid>
    <comment_count>3</comment_count>
    <who name="Xavier Mouton-Dubosc">xaviermd</who>
    <bug_when>2012-10-22 12:04:54 +0000</bug_when>
    <thetext>Sorry, I completely missed to answer.

I did it by not using the async feature of jquery : $.post first,  then return to let &lt;form&gt; fail.

A clever way to do the job, but i&apos;m still thinking that we perhaps need a way to trigger the interactive mode.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76901</commentid>
    <comment_count>4</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2012-10-22 12:10:37 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Sorry, I completely missed to answer.
&gt; 
&gt; I did it by not using the async feature of jquery : $.post first,  then
&gt; return to let &lt;form&gt; fail.
&gt; 
&gt; A clever way to do the job, but i&apos;m still thinking that we perhaps need a
&gt; way to trigger the interactive mode.

OK, I&apos;ll re-open this for now but I have to say that this is not likely to be a feature that gets considered for inclusion in the W3C HTML 5.0 spec. I think it probably needs to be moved to HTML.next for consideration as a feature in HTML 5.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121081</commentid>
    <comment_count>5</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2015-06-16 11:40:50 +0000</bug_when>
    <thetext>Resolving per https://www.w3.org/Bugs/Public/show_bug.cgi?id=17826#c9</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>