Skip to content

Commit

Permalink
Add pages for HTML*Element.willValidate (#35665)
Browse files Browse the repository at this point in the history
* Add pages for HTML*Element.willValidate

* Reviews
  • Loading branch information
Josh-Cena authored Sep 11, 2024
1 parent a846e59 commit 4524e28
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 6 deletions.
35 changes: 35 additions & 0 deletions files/en-us/web/api/htmlbuttonelement/willvalidate/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
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 {{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

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)
31 changes: 31 additions & 0 deletions files/en-us/web/api/htmlfieldsetelement/willvalidate/index.md
Original file line number Diff line number Diff line change
@@ -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)
35 changes: 35 additions & 0 deletions files/en-us/web/api/htmlinputelement/willvalidate/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
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 {{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

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)
15 changes: 10 additions & 5 deletions files/en-us/web/api/htmlobjectelement/willvalidate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
2 changes: 1 addition & 1 deletion files/en-us/web/api/htmloutputelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
31 changes: 31 additions & 0 deletions files/en-us/web/api/htmloutputelement/willvalidate/index.md
Original file line number Diff line number Diff line change
@@ -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)
31 changes: 31 additions & 0 deletions files/en-us/web/api/htmlselectelement/willvalidate/index.md
Original file line number Diff line number Diff line change
@@ -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 {{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

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)
31 changes: 31 additions & 0 deletions files/en-us/web/api/htmltextareaelement/willvalidate/index.md
Original file line number Diff line number Diff line change
@@ -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 {{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

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)

0 comments on commit 4524e28

Please sign in to comment.