mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
fix: prevent missing value error for radio button inputs without a name (#36197)
Signed-off-by: Barigbue <barigbuenbira@gmail.com>
This commit is contained in:
parent
a925a02c4c
commit
5a4e232cb6
2 changed files with 3 additions and 5 deletions
|
@ -810,6 +810,9 @@ impl HTMLInputElement {
|
||||||
InputType::Checkbox => self.Required() && !self.Checked(),
|
InputType::Checkbox => self.Required() && !self.Checked(),
|
||||||
// https://html.spec.whatwg.org/multipage/#radio-button-state-(type%3Dradio)%3Asuffering-from-being-missing
|
// https://html.spec.whatwg.org/multipage/#radio-button-state-(type%3Dradio)%3Asuffering-from-being-missing
|
||||||
InputType::Radio => {
|
InputType::Radio => {
|
||||||
|
if self.radio_group_name().is_none() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
let mut is_required = self.Required();
|
let mut is_required = self.Required();
|
||||||
let mut is_checked = self.Checked();
|
let mut is_checked = self.Checked();
|
||||||
for other in radio_group_iter(self, self.radio_group_name().as_ref()) {
|
for other in radio_group_iter(self, self.radio_group_name().as_ref()) {
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[form-validation-validity-valueMissing.html]
|
|
||||||
type: testharness
|
|
||||||
[[INPUT in RADIO status\] The checked attribute is false and the name attribute is empty]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue