mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibWeb: Implement the form-control willValidate property
This change — part of the HTML constraint-validation API (aka “client-side form validation”) — implements the willValidate IDL/DOM attribute/property for all form controls that support it.
This commit is contained in:
committed by
Tim Ledbetter
parent
7da5869b14
commit
e79319ad85
@@ -2523,6 +2523,13 @@ WebIDL::ExceptionOr<void> HTMLInputElement::step_up_or_down(bool is_down, WebIDL
|
||||
return {};
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-willvalidate
|
||||
bool HTMLInputElement::will_validate()
|
||||
{
|
||||
// The willValidate attribute's getter must return true, if this element is a candidate for constraint validation
|
||||
return is_candidate_for_constraint_validation();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-checkvalidity
|
||||
WebIDL::ExceptionOr<bool> HTMLInputElement::check_validity()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user