- From: <bugzilla@jessica.w3.org>
- Date: Thu, 30 Sep 2010 23:25:14 +0000
- To: public-html-bugzilla@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10923
Summary: Add an attribute to override UA's validation message
Product: HTML WG
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: HTML WG website
AssignedTo: dave.null@w3.org
ReportedBy: mounir.lamouri@gmail.com
QAContact: public-html-bugzilla@w3.org
CC: mjs@apple.com, Paul.Cotton@microsoft.com,
rubys@intertwingly.net, mike@w3.org, jonas@sicking.cc
.validationMessage currently returns a message depending of the error. We can
already assume that some websites will want to override this message. We
actually got some inputs in WhatWG mailing list in that sens [1].
It would probably be better to introduce an attribute letting the author
overriding the validation message instead of having them doing it the wrong way
(ie. with setCustomValidity()) or even not using form constraint validation
provided by the UA because of that.
The description would be:
"If an element is invalid and not barred from constraint validation and has a
errormessage attribute set different from the empty string then
.validationMessage should return the errormessage value instead of the regular
error message."
The use cases are simple:
- a field has a specific meaning in the website but the UA can't know that so
will show a generic message. For example, a username field.
- a field has more than one restriction and the UA will show an error depending
on the current validations errors. For example: <input type='email' required
maxlength='20' pattern=".*@company.com">. The UA will show some errors like
"Please, fill out this field" or "Please enter an email address" or "Please
follow the specified pattern" but the author might want to have an unique error
message : "Please enter your <COMPANY> email address".
[1]
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-September/028622.html
--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 30 September 2010 23:25:18 UTC