The idea is simple, if an element is invalid and mozErrorMessage is set, the error message will be overwritten by the string in mozErrorMessage. In some way, it lets the authors setting an error message without making the element suffering from a custom validity.
Jonas, should we add an IDL attribute for that? That might be more convenient but that might be annoying for authors if they use it and then we remove it, right?
I would say we should not add an IDL method. Seems better to add minimum amount of code to support an experimental feature.
Summary: Let the authors override validation message with mozErrorMessage attribute → Let the authors override validation message with x-moz-errormessage attribute
Assignee: nobody → mounir.lamouri
Attachment #479948 - Flags: review?(jonas)
Why such a very unusual naming for the attribute? Why x- prefix?
It's what HTML5 calls for these days. See towards the end of http://www.w3.org/Bugs/Public/show_bug.cgi?id=9590
Attachment #479950 - Flags: review?(jonas) → review+
(In reply to comment #5) > Why such a very unusual naming for the attribute? Why x- prefix? I agree, that's horrible !
x-vendor is terrible. But I'll argue in the W3C bug.
(In reply to comment #8) > x-vendor is terrible. But I'll argue in the W3C bug. If you do, please, CC me :)
Attachment #479950 - Flags: approval2.0? → approval2.0+
Pushed: http://hg.mozilla.org/mozilla-central/rev/188670e40942 But marking Target Milestone: beta7 because I realized this has been pushed accidentally with a big merge after a backout. I've no idea why :-/ I backed it out and pushed it again to have correct log.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b7
Documented: https://developer.mozilla.org/en/HTML/Element/Input And linked from Fx4 for developers and https://developer.mozilla.org/en/HTML/HTML5/Forms_in_HTML5
You need to log in before you can comment on or make changes to this bug.