LibWeb: Remove unintentional recursion in ValidityState::valid

This commit is contained in:
Tim Ledbetter 2025-02-18 16:44:24 +00:00 committed by Jelle Raaijmakers
parent 8e3798b25e
commit dd8cca180f
Notes: github-actions[bot] 2025-02-18 20:59:34 +00:00
2 changed files with 7 additions and 1 deletions

View file

@ -109,7 +109,7 @@ bool ValidityState::custom_error() const
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-validitystate-valid
bool ValidityState::valid() const
{
return !(value_missing() || type_mismatch() || pattern_mismatch() || too_long() || too_short() || range_underflow() || range_overflow() || step_mismatch() || bad_input() || custom_error() || valid());
return !(value_missing() || type_mismatch() || pattern_mismatch() || too_long() || too_short() || range_underflow() || range_overflow() || step_mismatch() || bad_input() || custom_error());
}
}

View file

@ -0,0 +1,6 @@
<!DOCTYPE html>
<input>
<script>
const input = document.querySelector('input');
const isValid = input.validity.valid;
</script>