Skip to content

Commit

Permalink
New pages: HTML<form>NoValidate
Browse files Browse the repository at this point in the history
  • Loading branch information
estelle committed Oct 9, 2024
1 parent 1c31c8e commit a5dc0aa
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 0 deletions.
47 changes: 47 additions & 0 deletions files/en-us/web/api/htmlbuttonelement/formnovalidate/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: "HTMLButtonElement: formNoValidate method"
short-title: formNoValidate
slug: Web/API/HTMLButtonElement/formNoValidate
page-type: web-api-instance-method
browser-compat: api.HTMLButtonElement.formNoValidate
---

{{APIRef("HTML DOM")}}

The **`formNoValidate`** property of the {{domxref("HTMLButtonElement")}} interface is boolean value indicating if the {{htmlelement("form")}} will bypass [constraint validation](/en-US/docs/Web/HTML/Constraint_validation) when submitted via the {{htmlelement("button")}}. It reflects the `<button>` element's [`formnovalidate`](/en-US/docs/Web/HTML/Element/button#formnovalidate) attribute.

Its value overrides the {{domxref("HTMLFormElement.noValidate", "noValidate")}} property of the {{domxref("HTMLFormElement")}} interface if the form is submitted via the button. This property can be retrieved or set.

## Value

A boolean.

## Examples

```js
const buttonElement = document.getElementById("myButton");
console.log(buttonElement.formNoValidate);
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("HTMLButtonElement.reportValidity()")}}
- {{domxref("HTMLButtonElement.checkValidity()")}}
- {{domxref("HTMLButtonElement.formAction")}}
- {{domxref("HTMLButtonElement.formEnctype")}}
- {{domxref("HTMLButtonElement.formMethod")}}
- {{domxref("HTMLButtonElement.formNoValidate")}}
- {{domxref("HTMLButtonElement.formTarget")}}
- {{HTMLElement("form")}}
- {{domxref("HTMLFormElement.noValidate")}}
- {{domxref("HTMLInputElement.formNoValidate")}}
- [Learn: Client-side form validation](/en-US/docs/Learn/Forms/Form_validation)
- [Guide: Constraint validation](/en-US/docs/Web/HTML/Constraint_validation)
47 changes: 47 additions & 0 deletions files/en-us/web/api/htmlformelement/novalidate/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: "HTMLFormElement: noValidate method"
short-title: noValidate
slug: Web/API/HTMLFormElement/noValidate
page-type: web-api-instance-method
browser-compat: api.HTMLFormElement.noValidate
---

{{APIRef("HTML DOM")}}

The **`noValidate`** property of the {{domxref("HTMLFormElement")}} interface is boolean value indicating if the {{htmlelement("form")}} will bypass [constraint validation](/en-US/docs/Web/HTML/Constraint_validation) when submitted. It reflects the `<form>` element's [`novalidate`](/en-US/docs/Web/HTML/Element/form#novalidate) attribute; if the attribute present, the value is `true`.

If this attribute is not set or the value is set to `false`, the form is validated. This can be overridden by setting the {{domxref("HTMLInputElement.formnovalidate")}} and {{domxref("HTMLButtonElement.formnovalidate")}} properties to `true`, or by including `formnovalidate` attributes on {{htmlelement("button")}} or {{htmlelement("button")}} that are used to submit the form.

This property can be retrieved or set.

## Value

A boolean.

## Examples

```js
const element = document.getElementById("myForm");
console.log(element.noValidate);
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("HTMLFormElement.reportValidity()")}}
- {{domxref("HTMLFormElement.checkValidity()")}}
- {{domxref("HTMLFormElement.action")}}
- {{domxref("HTMLFormElement.enctype")}}
- {{domxref("HTMLFormElement.method")}}
- {{domxref("HTMLFormElement.noValidate")}}
- {{domxref("HTMLFormElement.target")}}
- {{HTMLElement("form")}}
- [Learn: Client-side form validation](/en-US/docs/Learn/Forms/Form_validation)
- [Guide: Constraint validation](/en-US/docs/Web/HTML/Constraint_validation)
51 changes: 51 additions & 0 deletions files/en-us/web/api/htmlinputelement/formnovalidate/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: "HTMLInputElement: formNoValidate method"
short-title: formNoValidate
slug: Web/API/HTMLInputElement/formNoValidate
page-type: web-api-instance-method
browser-compat: api.HTMLInputElement.formNoValidate
---

{{APIRef("HTML DOM")}}

The **`formNoValidate`** property of the {{domxref("HTMLInputElement")}} interface is boolean value indicating if the {{htmlelement("form")}} will bypass [constraint validation](/en-US/docs/Web/HTML/Constraint_validation) when submitted via the {{htmlelement("input")}}. It reflects the `<input>` element's [`formnovalidate`](/en-US/docs/Web/HTML/Element/input#formnovalidate) attribute.

This property is valid only for [`submit`](/en-US/docs/Web/HTML/Element/input/submit) and [`image`](/en-US/docs/Web/HTML/Element/input/image) `<input>` elements.

Its value overrides the {{domxref("HTMLFormElement.noValidate", "noValidate")}} property of the {{domxref("HTMLFormElement")}} interface if the form is submitted via the input. This property can be retrieved or set.

## Value

A boolean.

## Examples

```js
const inputElement = document.getElementById("myInput");
console.log(inputElement.formNoValidate);
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("HTMLInputElement.reportValidity()")}}
- {{domxref("HTMLInputElement.checkValidity()")}}
- {{domxref("HTMLInputElement.formAction")}}
- {{domxref("HTMLInputElement.formEnctype")}}
- {{domxref("HTMLInputElement.formMethod")}}
- {{domxref("HTMLInputElement.formNoValidate")}}
- {{domxref("HTMLInputElement.formTarget")}}
- [`<input type="submit">`](/en-US/docs/Web/HTML/Element/input/submit)
- [`<input type="image">`](/en-US/docs/Web/HTML/Element/input/image)
- {{HTMLElement("form")}}
- {{domxref("HTMLFormElement.noValidate")}}
- {{domxref("HTMLButtonElement.formNoValidate")}}
- [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 a5dc0aa

Please sign in to comment.