From bbf9edd9d89dbb4ec6f657cae741050a91616dda Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Sat, 31 Aug 2024 16:22:08 -0400 Subject: [PATCH 1/2] Add pages for HTML*Element.willValidate --- .../htmlbuttonelement/willvalidate/index.md | 31 +++++++++++++++++++ .../htmlfieldsetelement/willvalidate/index.md | 31 +++++++++++++++++++ .../htmlinputelement/willvalidate/index.md | 31 +++++++++++++++++++ .../htmlobjectelement/willvalidate/index.md | 15 ++++++--- .../en-us/web/api/htmloutputelement/index.md | 2 +- .../htmloutputelement/willvalidate/index.md | 31 +++++++++++++++++++ .../htmlselectelement/willvalidate/index.md | 31 +++++++++++++++++++ .../htmltextareaelement/willvalidate/index.md | 31 +++++++++++++++++++ 8 files changed, 197 insertions(+), 6 deletions(-) create mode 100644 files/en-us/web/api/htmlbuttonelement/willvalidate/index.md create mode 100644 files/en-us/web/api/htmlfieldsetelement/willvalidate/index.md create mode 100644 files/en-us/web/api/htmlinputelement/willvalidate/index.md create mode 100644 files/en-us/web/api/htmloutputelement/willvalidate/index.md create mode 100644 files/en-us/web/api/htmlselectelement/willvalidate/index.md create mode 100644 files/en-us/web/api/htmltextareaelement/willvalidate/index.md diff --git a/files/en-us/web/api/htmlbuttonelement/willvalidate/index.md b/files/en-us/web/api/htmlbuttonelement/willvalidate/index.md new file mode 100644 index 000000000000000..18233e8ffa6664d --- /dev/null +++ b/files/en-us/web/api/htmlbuttonelement/willvalidate/index.md @@ -0,0 +1,31 @@ +--- +title: "HTMLButtonElement: willValidate property" +short-title: willValidate +slug: Web/API/HTMLButtonElement/willValidate +page-type: web-api-instance-property +browser-compat: api.HTMLButtonElement.willValidate +--- + +{{APIRef("HTML DOM")}} + +The **`willValidate`** read-only property of the {{domxref("HTMLButtonElement")}} interface indicates whether the button is a candidate for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). It is `false` if any conditions bar it from constraint validation, including: its {{domxref("HTMLButtonElement.type", "type")}} is `reset` or `button`; it has a {{HTMLElement("datalist")}} ancestor; or the {{domxref("HTMLButtonElement.disabled", "disabled")}} property is set to `true`. + +## Value + +A boolean value. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("HTMLButtonElement.checkValidity()")}} +- {{HTMLElement("button")}} +- {{HTMLElement("form")}} +- [Learn: Client-side form validation](/en-US/docs/Learn/Forms/Form_validation) +- [Guide: Constraint validation](/en-US/docs/Web/HTML/Constraint_validation) diff --git a/files/en-us/web/api/htmlfieldsetelement/willvalidate/index.md b/files/en-us/web/api/htmlfieldsetelement/willvalidate/index.md new file mode 100644 index 000000000000000..3d67251c9be146f --- /dev/null +++ b/files/en-us/web/api/htmlfieldsetelement/willvalidate/index.md @@ -0,0 +1,31 @@ +--- +title: "HTMLFieldSetElement: willValidate property" +short-title: willValidate +slug: Web/API/HTMLFieldSetElement/willValidate +page-type: web-api-instance-property +browser-compat: api.HTMLFieldSetElement.willValidate +--- + +{{APIRef("HTML DOM")}} + +The **`willValidate`** read-only property of the {{domxref("HTMLFieldSetElement")}} interface returns `false`, because {{HTMLElement("fieldset")}} elements are not candidates for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). + +## Value + +The boolean value `false`. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("HTMLFieldSetElement.checkValidity()")}} +- {{HTMLElement("fieldset")}} +- {{HTMLElement("form")}} +- [Learn: Client-side form validation](/en-US/docs/Learn/Forms/Form_validation) +- [Guide: Constraint validation](/en-US/docs/Web/HTML/Constraint_validation) diff --git a/files/en-us/web/api/htmlinputelement/willvalidate/index.md b/files/en-us/web/api/htmlinputelement/willvalidate/index.md new file mode 100644 index 000000000000000..bed9abce68edffe --- /dev/null +++ b/files/en-us/web/api/htmlinputelement/willvalidate/index.md @@ -0,0 +1,31 @@ +--- +title: "HTMLInputElement: willValidate property" +short-title: willValidate +slug: Web/API/HTMLInputElement/willValidate +page-type: web-api-instance-property +browser-compat: api.HTMLInputElement.willValidate +--- + +{{APIRef("HTML DOM")}} + +The **`willValidate`** read-only property of the {{domxref("HTMLInputElement")}} interface indicates whether the element is a candidate for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). It is `false` if any conditions bar it from constraint validation, including: its {{domxref("HTMLInputElement.type", "type")}} is one of `hidden`, `reset` or `button`; it has a {{HTMLElement("datalist")}} ancestor; or its {{domxref("HTMLInputElement.disabled", "disabled")}} property is `true`. + +## Value + +A boolean value. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("HTMLInputElement.checkValidity()")}} +- {{HTMLElement("input")}} +- {{HTMLElement("form")}} +- [Learn: Client-side form validation](/en-US/docs/Learn/Forms/Form_validation) +- [Guide: Constraint validation](/en-US/docs/Web/HTML/Constraint_validation) diff --git a/files/en-us/web/api/htmlobjectelement/willvalidate/index.md b/files/en-us/web/api/htmlobjectelement/willvalidate/index.md index 5d2f4b2d2b4c778..56f2af15b0997f2 100644 --- a/files/en-us/web/api/htmlobjectelement/willvalidate/index.md +++ b/files/en-us/web/api/htmlobjectelement/willvalidate/index.md @@ -8,14 +8,11 @@ browser-compat: api.HTMLObjectElement.willValidate {{APIRef("HTML DOM")}} -The **`willValidate`** read-only property of -the {{domxref("HTMLObjectElement")}} interface returns a boolean value that -indicates whether the element is a candidate for constraint validation. Always false for -HTMLObjectElement objects. +The **`willValidate`** read-only property of the {{domxref("HTMLObjectElement")}} interface returns `false`, because {{HTMLElement("object")}} elements are not candidates for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). ## Value -A boolean value. +The boolean value `false`. ## Specifications @@ -24,3 +21,11 @@ A boolean value. ## Browser compatibility {{Compat}} + +## See also + +- {{domxref("HTMLObjectElement.checkValidity()")}} +- {{HTMLElement("object")}} +- {{HTMLElement("form")}} +- [Learn: Client-side form validation](/en-US/docs/Learn/Forms/Form_validation) +- [Guide: Constraint validation](/en-US/docs/Web/HTML/Constraint_validation) diff --git a/files/en-us/web/api/htmloutputelement/index.md b/files/en-us/web/api/htmloutputelement/index.md index 36d240538fb1718..29cc9bb8a311387 100644 --- a/files/en-us/web/api/htmloutputelement/index.md +++ b/files/en-us/web/api/htmloutputelement/index.md @@ -34,7 +34,7 @@ _This interface also inherits properties from its parent, {{domxref("HTMLElement - {{domxref("HTMLOutputElement.value")}} - : A string representing the value of the contents of the elements. Behaves like the {{domxref("Node.textContent")}} property. - {{domxref("HTMLOutputElement.willValidate")}} {{ReadOnlyInline}} - - : A boolean value indicating whether the element is a candidate for constraint validation. + - : Returns a boolean value that indicates whether the element is a candidate for constraint validation. Always `false` for `HTMLOutputElement` objects. ## Instance methods diff --git a/files/en-us/web/api/htmloutputelement/willvalidate/index.md b/files/en-us/web/api/htmloutputelement/willvalidate/index.md new file mode 100644 index 000000000000000..583c366702a519e --- /dev/null +++ b/files/en-us/web/api/htmloutputelement/willvalidate/index.md @@ -0,0 +1,31 @@ +--- +title: "HTMLOutputElement: willValidate property" +short-title: willValidate +slug: Web/API/HTMLOutputElement/willValidate +page-type: web-api-instance-property +browser-compat: api.HTMLOutputElement.willValidate +--- + +{{APIRef("HTML DOM")}} + +The **`willValidate`** read-only property of the {{domxref("HTMLOutputElement")}} interface returns `false`, because {{HTMLElement("output")}} elements are not candidates for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). + +## Value + +The boolean value `false`. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("HTMLOutputElement.checkValidity()")}} +- {{HTMLElement("output")}} +- {{HTMLElement("form")}} +- [Learn: Client-side form validation](/en-US/docs/Learn/Forms/Form_validation) +- [Guide: Constraint validation](/en-US/docs/Web/HTML/Constraint_validation) diff --git a/files/en-us/web/api/htmlselectelement/willvalidate/index.md b/files/en-us/web/api/htmlselectelement/willvalidate/index.md new file mode 100644 index 000000000000000..ad1c99823cddc62 --- /dev/null +++ b/files/en-us/web/api/htmlselectelement/willvalidate/index.md @@ -0,0 +1,31 @@ +--- +title: "HTMLSelectElement: willValidate property" +short-title: willValidate +slug: Web/API/HTMLSelectElement/willValidate +page-type: web-api-instance-property +browser-compat: api.HTMLSelectElement.willValidate +--- + +{{APIRef("HTML DOM")}} + +The **`willValidate`** read-only property of the {{domxref("HTMLSelectElement")}} interface indicates whether the element is a candidate for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). It is `false` if any conditions bar it from constraint validation, such as when its {{domxref("HTMLSelectElement.disabled", "disabled")}} property is `true`. + +## Value + +A boolean value. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("HTMLSelectElement.checkValidity()")}} +- {{HTMLElement("select")}} +- {{HTMLElement("form")}} +- [Learn: Client-side form validation](/en-US/docs/Learn/Forms/Form_validation) +- [Guide: Constraint validation](/en-US/docs/Web/HTML/Constraint_validation) diff --git a/files/en-us/web/api/htmltextareaelement/willvalidate/index.md b/files/en-us/web/api/htmltextareaelement/willvalidate/index.md new file mode 100644 index 000000000000000..8969b4df0a92ada --- /dev/null +++ b/files/en-us/web/api/htmltextareaelement/willvalidate/index.md @@ -0,0 +1,31 @@ +--- +title: "HTMLTextAreaElement: willValidate property" +short-title: willValidate +slug: Web/API/HTMLTextAreaElement/willValidate +page-type: web-api-instance-property +browser-compat: api.HTMLTextAreaElement.willValidate +--- + +{{APIRef("HTML DOM")}} + +The **`willValidate`** read-only property of the {{domxref("HTMLTextAreaElement")}} interface indicates whether the element is a candidate for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). It is `false` if any conditions bar it from constraint validation, such as when its {{domxref("HTMLTextAreaElement.disabled", "disabled")}} or {{domxref("HTMLTextAreaElement.readOnly", "readOnly")}} property is `true`. + +## Value + +A boolean value. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("HTMLTextAreaElement.checkValidity()")}} +- {{HTMLElement("textarea")}} +- {{HTMLElement("form")}} +- [Learn: Client-side form validation](/en-US/docs/Learn/Forms/Form_validation) +- [Guide: Constraint validation](/en-US/docs/Web/HTML/Constraint_validation) From b4531d8c0d7de800f1093f6fbf751bf606b2b355 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Tue, 10 Sep 2024 20:56:00 -0400 Subject: [PATCH 2/2] Reviews --- files/en-us/web/api/htmlbuttonelement/willvalidate/index.md | 6 +++++- files/en-us/web/api/htmlinputelement/willvalidate/index.md | 6 +++++- files/en-us/web/api/htmlselectelement/willvalidate/index.md | 2 +- .../en-us/web/api/htmltextareaelement/willvalidate/index.md | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/files/en-us/web/api/htmlbuttonelement/willvalidate/index.md b/files/en-us/web/api/htmlbuttonelement/willvalidate/index.md index 18233e8ffa6664d..157f5809920a44f 100644 --- a/files/en-us/web/api/htmlbuttonelement/willvalidate/index.md +++ b/files/en-us/web/api/htmlbuttonelement/willvalidate/index.md @@ -8,7 +8,11 @@ browser-compat: api.HTMLButtonElement.willValidate {{APIRef("HTML DOM")}} -The **`willValidate`** read-only property of the {{domxref("HTMLButtonElement")}} interface indicates whether the button is a candidate for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). It is `false` if any conditions bar it from constraint validation, including: its {{domxref("HTMLButtonElement.type", "type")}} is `reset` or `button`; it has a {{HTMLElement("datalist")}} ancestor; or the {{domxref("HTMLButtonElement.disabled", "disabled")}} property is set to `true`. +The **`willValidate`** read-only property of the {{domxref("HTMLButtonElement")}} interface indicates whether the {{htmlelement("button")}} element is a candidate for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). It is `false` if any conditions bar it from constraint validation, including: + +- Its {{domxref("HTMLButtonElement.type", "type")}} is `reset` or `button`; +- It has a {{HTMLElement("datalist")}} ancestor; +- The {{domxref("HTMLButtonElement.disabled", "disabled")}} property is `true`. ## Value diff --git a/files/en-us/web/api/htmlinputelement/willvalidate/index.md b/files/en-us/web/api/htmlinputelement/willvalidate/index.md index bed9abce68edffe..ed9e8ddc39aa2bb 100644 --- a/files/en-us/web/api/htmlinputelement/willvalidate/index.md +++ b/files/en-us/web/api/htmlinputelement/willvalidate/index.md @@ -8,7 +8,11 @@ browser-compat: api.HTMLInputElement.willValidate {{APIRef("HTML DOM")}} -The **`willValidate`** read-only property of the {{domxref("HTMLInputElement")}} interface indicates whether the element is a candidate for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). It is `false` if any conditions bar it from constraint validation, including: its {{domxref("HTMLInputElement.type", "type")}} is one of `hidden`, `reset` or `button`; it has a {{HTMLElement("datalist")}} ancestor; or its {{domxref("HTMLInputElement.disabled", "disabled")}} property is `true`. +The **`willValidate`** read-only property of the {{domxref("HTMLInputElement")}} interface indicates whether the {{htmlelement("input")}} element is a candidate for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). It is `false` if any conditions bar it from constraint validation, including: + +- Its {{domxref("HTMLInputElement.type", "type")}} is one of `hidden`, `reset` or `button`; +- It has a {{HTMLElement("datalist")}} ancestor; +- Its {{domxref("HTMLInputElement.disabled", "disabled")}} property is `true`. ## Value diff --git a/files/en-us/web/api/htmlselectelement/willvalidate/index.md b/files/en-us/web/api/htmlselectelement/willvalidate/index.md index ad1c99823cddc62..1a831a63ac2f357 100644 --- a/files/en-us/web/api/htmlselectelement/willvalidate/index.md +++ b/files/en-us/web/api/htmlselectelement/willvalidate/index.md @@ -8,7 +8,7 @@ browser-compat: api.HTMLSelectElement.willValidate {{APIRef("HTML DOM")}} -The **`willValidate`** read-only property of the {{domxref("HTMLSelectElement")}} interface indicates whether the element is a candidate for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). It is `false` if any conditions bar it from constraint validation, such as when its {{domxref("HTMLSelectElement.disabled", "disabled")}} property is `true`. +The **`willValidate`** read-only property of the {{domxref("HTMLSelectElement")}} interface indicates whether the {{htmlelement("select")}} element is a candidate for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). It is `false` if any conditions bar it from constraint validation, such as when its {{domxref("HTMLSelectElement.disabled", "disabled")}} property is `true`. ## Value diff --git a/files/en-us/web/api/htmltextareaelement/willvalidate/index.md b/files/en-us/web/api/htmltextareaelement/willvalidate/index.md index 8969b4df0a92ada..10fac66a528c7b8 100644 --- a/files/en-us/web/api/htmltextareaelement/willvalidate/index.md +++ b/files/en-us/web/api/htmltextareaelement/willvalidate/index.md @@ -8,7 +8,7 @@ browser-compat: api.HTMLTextAreaElement.willValidate {{APIRef("HTML DOM")}} -The **`willValidate`** read-only property of the {{domxref("HTMLTextAreaElement")}} interface indicates whether the element is a candidate for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). It is `false` if any conditions bar it from constraint validation, such as when its {{domxref("HTMLTextAreaElement.disabled", "disabled")}} or {{domxref("HTMLTextAreaElement.readOnly", "readOnly")}} property is `true`. +The **`willValidate`** read-only property of the {{domxref("HTMLTextAreaElement")}} interface indicates whether the {{htmlelement("textarea")}} element is a candidate for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation). It is `false` if any conditions bar it from constraint validation, such as when its {{domxref("HTMLTextAreaElement.disabled", "disabled")}} or {{domxref("HTMLTextAreaElement.readOnly", "readOnly")}} property is `true`. ## Value