mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
LibWeb: Implement HTMLFormElement::checkValidity (constraint validation)
This change implements the requirements from the HTML spec at https://html.spec.whatwg.org/#statically-validate-the-constraints and https://html.spec.whatwg.org/#dom-form-checkvalidity — the parts of the HTML constraint validation API (aka “client-side form validation”) https://html.spec.whatwg.org/#the-constraint-validation-api for HTMLFormElement itself — as well as the code for the requirements at https://html.spec.whatwg.org/#check-validity-steps, which are the shared requirements for the checkValidity method for individual form controls.
This commit is contained in:
committed by
Tim Ledbetter
parent
b4e47f198a
commit
7c34746571
@@ -78,6 +78,12 @@ public:
|
||||
GC::Ref<HTMLFormControlsCollection> elements() const;
|
||||
unsigned length() const;
|
||||
|
||||
struct StaticValidationResult {
|
||||
bool result;
|
||||
GC::RootVector<GC::Ref<DOM::Element>> unhandled_invalid_controls;
|
||||
};
|
||||
|
||||
StaticValidationResult statically_validate_constraints();
|
||||
WebIDL::ExceptionOr<bool> check_validity();
|
||||
WebIDL::ExceptionOr<bool> report_validity();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user