HTMLTextAreaElement: reportValidity() method

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{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

  • {{domxref("HTMLTextAreaElement.checkValidity()")}}
  • {{HTMLElement("textarea")}}
  • {{HTMLElement("form")}}
  • Learn: Client-side form validation
  • Guide: Constraint validation
  • CSS {{cssxref(":valid")}} and {{cssxref(":invalid")}} pseudo-classes