Back to Content

HTMLTextAreaElement: reportValidity() method

files/en-us/web/api/htmltextareaelement/reportvalidity/index.md

latest1017 B
Original Source

{{APIRef("HTML DOM")}}

The reportValidity() method of the {{domxref("HTMLTextAreaElement")}} interface performs the same validity checking steps as the {{domxref("HTMLTextAreaElement.checkValidity", "checkValidity()")}} method. In addition, if the {{domxref("HTMLElement/invalid_event", "invalid")}} event is not canceled, the browser displays the problem to the user.

Syntax

js-nolint
reportValidity()

Parameters

None.

Return value

Returns true if the element's value has no validity problems; otherwise, returns false.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also