Closed Bug 612134 Opened 15 years ago Closed 14 years ago

html5 form validation for <select>

Categories

(Firefox :: General, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: gmoulin.dev, Unassigned)

Details

(Whiteboard: dupeme?)

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7) Gecko/20100101 Firefox/4.0b7 Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7) Gecko/20100101 Firefox/4.0b7 Hi, i'm playing with html5 form validation. For a required <select> when the option selected has a null value the JS API has the wrong value for validity property. select.validity.valid = true select.validity.valueMissing = false Test code: <form> <select required name="test" id="test" onchange="alert('valid = ' + this.validity.valid + ', value missing = ' + this.validity.valueMissing );"> <option value="">null value</option> <option value="filled">with value</option> </select> </form> Expected result: When validating a required <select> which has an empty value the validity property should have the following values: select.validity.valid = false select.validity.valueMissing = true Reproducible: Always Steps to Reproduce: change the value of the select and click outside to fire the change event
Whiteboard: dupeme?
Reporter -> Are you still seeing this issue with the latest nightly?
same problem still this result with empty value option selected select.validity.valid = false select.validity.valueMissing = true
I have uploaded a testcase @ http://afarkas.github.com/webshim/tests/ff-select-required-maxlength.html. But I can't reproduce this bug. Everything works fine in FF4beta8 and nightlies (Built on 26-Dec-2010). @gm Have you tryed testing this in safe mode? I have also testet with Win7
I just tested. Seems ok now. I will fill a bug to firebug, the validity object have not the same values in the console and the "detail".
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
It's marked as resolved, but It doesn't in FF14. I try this in tryit editor of the w3schools: <!DOCTYPE html> <html> <body> <form > <select required> <option value="" disabled="disabled" selected="selected">Seleccione marca</option> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="opel">Opel</option> <option value="audi">Audi</option> </select> <button>send</button> </form> </body> </html> If I click but I don't select nothing (I click outside and then there's no option selected, by default is an disabled and no value option selected), validation don't work and I can send data.
(In reply to prueboblog from comment #6) > It's marked as resolved, but It doesn't in FF14. Filed a new Bug 778101
You need to log in before you can comment on or make changes to this bug.