Closed
Bug 556013
Opened 15 years ago
Closed 14 years ago
Implement novalidate attribute for form elements
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla2.0b7
Tracking | Status | |
---|---|---|
blocking2.0 | --- | beta7+ |
People
(Reporter: mounir, Assigned: mounir)
References
()
Details
(Keywords: dev-doc-complete, html5)
Attachments
(1 file, 2 obsolete files)
13.18 KB,
patch
|
Details | Diff | Splinter Review |
If the novalidate attribute is present, the form has not to be validate when submitted.
Assignee | ||
Comment 1•14 years ago
|
||
We can't ship Firefox 4 with form validation and without this attribute.
I'd say that this isn't a new feature but rather finishing up the whole validation thing. And it should be a safe patch as long as we get it in early enough.
blocking2.0: ? → beta6+
Assignee | ||
Comment 3•14 years ago
|
||
Attachment #473245 -
Flags: review?(Olli.Pettay)
Assignee | ||
Comment 4•14 years ago
|
||
The assert was wrong and I've added some tests.
Attachment #473245 -
Attachment is obsolete: true
Attachment #473328 -
Flags: review?(Olli.Pettay)
Attachment #473245 -
Flags: review?(Olli.Pettay)
Comment 5•14 years ago
|
||
Comment on attachment 473328 [details] [diff] [review]
Patch v1.1
I'd put HasAttr(kNameSpaceID_None, nsGkAtoms::novalidate) to
CheckValidFormSubmission().
Or is there a reason not to?
Assignee | ||
Comment 6•14 years ago
|
||
(In reply to comment #5)
> Comment on attachment 473328 [details] [diff] [review]
> Patch Part2 v1.1
>
> I'd put HasAttr(kNameSpaceID_None, nsGkAtoms::novalidate) to
> CheckValidFormSubmission().
> Or is there a reason not to?
Yes, we will have to check for formnovalidate on the submit control and CheckValidFormSubmission() can't check that for us. So, better to have novalidate and formnovalidate checks at the same place.
I hate doing that but the base is already quite awful and we can't reasonably refactor the current code so close from releasing and without a good test coverage :-/
Comment 7•14 years ago
|
||
Comment on attachment 473328 [details] [diff] [review]
Patch v1.1
>+document.forms[0].addEventListener("submit", function(aEvent) {
>+ aEvent.target.removeAttribute("submit", arguments.callee, false);
removeAttribute? Also elsewhere.
Attachment #473328 -
Flags: review?(Olli.Pettay) → review+
Shouldn't there be checks for the formnovalidate attribute somewhere? Or am I missing something?
Assignee | ||
Comment 9•14 years ago
|
||
(In reply to comment #8)
> Shouldn't there be checks for the formnovalidate attribute somewhere? Or am I
> missing something?
bug 589696(In reply to comment #7)
> Comment on attachment 473328 [details] [diff] [review]
> Patch Part2 v1.1
>
>
> >+document.forms[0].addEventListener("submit", function(aEvent) {
> >+ aEvent.target.removeAttribute("submit", arguments.callee, false);
> removeAttribute? Also elsewhere.
oooups :)
Assignee | ||
Updated•14 years ago
|
Attachment #473328 -
Attachment description: Patch Part2 v1.1 → Patch v1.1
Assignee | ||
Comment 10•14 years ago
|
||
r=smaug
Tests fixed.
Attachment #473328 -
Attachment is obsolete: true
Assignee | ||
Comment 11•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b6
Comment 12•14 years ago
|
||
Updated•14 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•