This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14876 - Empty value attributes are being validated.
Summary: Empty value attributes are being validated.
Status: RESOLVED FIXED
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-18 15:54 UTC by Simon B
Modified: 2015-08-23 07:07 UTC (History)
1 user (show)

See Also:


Attachments

Description Simon B 2011-11-18 15:54:28 UTC
Perhaps I have misunderstood something, however there seems to be a bug where the Validator is not in line with the HTML 5 spec. Value attribute should be able to be left empty. When validating number and date fields with empty value attribute, an error is shown.

For Numbers:

Bad value for attribute value on element input: The empty string is not a valid floating point number.

For Dates:

Bad value for attribute value on element input: The literal did not satisfy the date format.
Comment 1 Michael[tm] Smith 2011-11-21 07:24:17 UTC
Thanks for catching this.

The reason for the current validator behavior is that the spec used to say this:

  - The value attribute, if specified, must have a value that is a valid floating point number.
  - The value attribute, if specified, must have a value that is a valid date string.

So that's what was implemented in validator code.

But the spec now says this:

  - The value attribute, if specified and not empty, must have a value that is a valid floating point number.
  - The value attribute, if specified and not empty, must have a value that is a valid date string.

So, we need to update the code to match the current spec.

Because this is bug in the validator.nu backend, I'll use the following bug from here on to track it:

  http://bugzilla.validator.nu/show_bug.cgi?id=881

So, you may want to add yourself to the Cc list on that bug.

I'll update this bug after I get the code checked in.
Comment 2 Michael[tm] Smith 2012-11-18 11:27:04 UTC
https://github.com/validator/syntax/commit/f55a8abe68315f8d331ac987d896cfb31be3ef0d

I'll push the fix to the validator later this week.