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 9579 - An element should not suffer from pattern mismatch if the pattern attribute value is the empty string
Summary: An element should not suffer from pattern mismatch if the pattern attribute v...
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/spec/forms.ht...
Whiteboard:
Keywords: NE
Depends on:
Blocks:
 
Reported: 2010-04-22 09:46 UTC by Mounir Lamouri
Modified: 2010-10-04 14:33 UTC (History)
6 users (show)

See Also:


Attachments

Description Mounir Lamouri 2010-04-22 09:46:19 UTC
At the moment, the pattern attribute can be used for constraint validation if the pattern attribute is specified. So, having pattern="" means the element will suffer from constraint validation if it has a value different from the empty string. I think this will lead to misinterpretation, some authors will probably set the pattern attribute to the empty string to disable it and not to prevent the user to enter a value. To prevent the user to enter a value, the 'disabled' attribute should be used instead.

It looks like Opera's implementation is following the current spec but Webkit's implementation isn't checking for constraint validation when the pattern attribute is the empty string. I think this shows there is an issue here.
Comment 1 Ian 'Hixie' Hickson 2010-09-10 09:09:23 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale:

This would just be magic, which leads to confusion. I don't think it would help. It's not like people aren't going to work out what's going on, or not notice it — a pattern that nothing matches will be caught pretty quickly.

Please file a bug on Webkit.