LibWeb: Implement setCustomValidity IDL attribute

This commit is contained in:
Psychpsyo 2025-02-17 20:50:56 +01:00 committed by Andrew Kaster
commit a8004a77bb
Notes: github-actions[bot] 2025-02-18 17:18:11 +00:00
12 changed files with 29 additions and 24 deletions

View file

@ -125,6 +125,9 @@ public:
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-validity
GC::Ref<ValidityState const> validity() const;
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-setcustomvalidity
void set_custom_validity(String& error);
protected:
FormAssociatedElement() = default;
virtual ~FormAssociatedElement() = default;
@ -144,6 +147,9 @@ private:
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#parser-inserted-flag
bool m_parser_inserted { false };
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#custom-validity-error-message
String m_custom_validity_error_message;
};
enum class SelectionSource {