<?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>23120</bug_id>
          
          <creation_ts>2013-09-01 02:08:11 +0000</creation_ts>
          <short_desc>input[type=number] need to provide a way in which the user can validate the user&apos;s entered value (e.g. for validation and feedback) -- the current value sanitization algorithm prevents any interaction [...]</short_desc>
          <delta_ts>2013-10-21 21:03:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#number-state-(type=number)</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>alphagma</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92790</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-09-01 02:08:11 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html
Multipage: http://www.whatwg.org/C#number-state-(type=number)
Complete: http://www.whatwg.org/c#number-state-(type=number)
Referrer: http://stackoverflow.com/questions/16485014/validate-number-type-inputs-with-jquery?rq=1

Comment:
input[type=number] need to provide a way in which the user can validate the
user&apos;s entered value (e.g. for validation and feedback) -- the current value
sanitization algorithm prevents any interaction with it if the entered value
is anything but a valid floating point number. Furthermore, it is impossible
to distinguish between invalid-format values and empty-string values.

Posted from: 99.47.180.118
User agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.22 Safari/537.36</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92895</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-09-03 17:40:42 +0000</bug_when>
    <thetext>Is element.validity.badInput insufficient?

The point of type=number is that the browser is the one that&apos;s supposed to validate the user&apos;s input.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92905</commentid>
    <comment_count>2</comment_count>
    <who name="">alphagma</who>
    <bug_when>2013-09-03 19:19:56 +0000</bug_when>
    <thetext>Hi Ian, thanks for your reply. My bad, at the moment of reporting the issue I was not aware of validity.badInput.

I believe this request can be closed then.

Still, as a suggestion, I would like to say that a value of empty string is misleading, while the string representation of NaN would be more indicative of the current state of the input.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94529</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-10-10 00:21:02 +0000</bug_when>
    <thetext>The idea is to never expose an invalid value, because doing so would mean that code would need to be ready to handle it. The current design means that you don&apos;t have to worry about bad input unless you want to.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95042</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-10-21 21:03:18 +0000</bug_when>
    <thetext>closing per comment 2. Feel free to file new bugs on related issues. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>