Form constraints validation

This commit is contained in:
teapotd 2020-04-01 11:08:02 +02:00
parent e47e884cc7
commit 779552ee7d
72 changed files with 1224 additions and 4336 deletions

View file

@ -30,12 +30,12 @@ interface HTMLButtonElement : HTMLElement {
attribute DOMString value;
// attribute HTMLMenuElement? menu;
//readonly attribute boolean willValidate;
readonly attribute boolean willValidate;
readonly attribute ValidityState validity;
//readonly attribute DOMString validationMessage;
//boolean checkValidity();
//boolean reportValidity();
//void setCustomValidity(DOMString error);
readonly attribute DOMString validationMessage;
boolean checkValidity();
boolean reportValidity();
void setCustomValidity(DOMString error);
readonly attribute NodeList labels;
};

View file

@ -17,10 +17,10 @@ interface HTMLFieldSetElement : HTMLElement {
[SameObject] readonly attribute HTMLCollection elements;
//readonly attribute boolean willValidate;
readonly attribute boolean willValidate;
[SameObject] readonly attribute ValidityState validity;
//readonly attribute DOMString validationMessage;
//boolean checkValidity();
//boolean reportValidity();
//void setCustomValidity(DOMString error);
readonly attribute DOMString validationMessage;
boolean checkValidity();
boolean reportValidity();
void setCustomValidity(DOMString error);
};

View file

@ -34,8 +34,8 @@ interface HTMLFormElement : HTMLElement {
void submit();
[CEReactions]
void reset();
//boolean checkValidity();
//boolean reportValidity();
boolean checkValidity();
boolean reportValidity();
};
// https://html.spec.whatwg.org/multipage/#selectionmode

View file

@ -82,12 +82,12 @@ interface HTMLInputElement : HTMLElement {
[Throws] void stepUp(optional long n = 1);
[Throws] void stepDown(optional long n = 1);
//readonly attribute boolean willValidate;
//readonly attribute ValidityState validity;
//readonly attribute DOMString validationMessage;
//boolean checkValidity();
//boolean reportValidity();
//void setCustomValidity(DOMString error);
readonly attribute boolean willValidate;
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
boolean reportValidity();
void setCustomValidity(DOMString error);
readonly attribute NodeList? labels;

View file

@ -25,12 +25,12 @@ interface HTMLObjectElement : HTMLElement {
//readonly attribute Document? contentDocument;
//readonly attribute WindowProxy? contentWindow;
//readonly attribute boolean willValidate;
readonly attribute boolean willValidate;
readonly attribute ValidityState validity;
//readonly attribute DOMString validationMessage;
//boolean checkValidity();
//boolean reportValidity();
//void setCustomValidity(DOMString error);
readonly attribute DOMString validationMessage;
boolean checkValidity();
boolean reportValidity();
void setCustomValidity(DOMString error);
//legacycaller any (any... arguments);

View file

@ -18,12 +18,12 @@ interface HTMLOutputElement : HTMLElement {
[CEReactions]
attribute DOMString value;
// readonly attribute boolean willValidate;
readonly attribute boolean willValidate;
readonly attribute ValidityState validity;
// readonly attribute DOMString validationMessage;
// boolean checkValidity();
// boolean reportValidity();
// void setCustomValidity(DOMString error);
readonly attribute DOMString validationMessage;
boolean checkValidity();
boolean reportValidity();
void setCustomValidity(DOMString error);
readonly attribute NodeList labels;
};

View file

@ -16,8 +16,8 @@ interface HTMLSelectElement : HTMLElement {
attribute boolean multiple;
[CEReactions]
attribute DOMString name;
// [CEReactions]
// attribute boolean required;
[CEReactions]
attribute boolean required;
[CEReactions]
attribute unsigned long size;
@ -41,12 +41,12 @@ interface HTMLSelectElement : HTMLElement {
attribute long selectedIndex;
attribute DOMString value;
// readonly attribute boolean willValidate;
readonly attribute boolean willValidate;
readonly attribute ValidityState validity;
// readonly attribute DOMString validationMessage;
// boolean checkValidity();
// boolean reportValidity();
// void setCustomValidity(DOMString error);
readonly attribute DOMString validationMessage;
boolean checkValidity();
boolean reportValidity();
void setCustomValidity(DOMString error);
readonly attribute NodeList labels;
};

View file

@ -43,12 +43,12 @@ interface HTMLTextAreaElement : HTMLElement {
attribute [TreatNullAs=EmptyString] DOMString value;
readonly attribute unsigned long textLength;
// readonly attribute boolean willValidate;
// readonly attribute ValidityState validity;
// readonly attribute DOMString validationMessage;
// boolean checkValidity();
// boolean reportValidity();
// void setCustomValidity(DOMString error);
readonly attribute boolean willValidate;
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
boolean reportValidity();
void setCustomValidity(DOMString error);
readonly attribute NodeList labels;