Back to Content

HTMLOutputElement: validationMessage property

files/en-us/web/api/htmloutputelement/validationmessage/index.md

latest1.1 KB
Original Source

{{APIRef("HTML DOM")}}

The validationMessage read-only property of the {{domxref("HTMLOutputElement")}} interface returns a string representing a localized message that describes the validation constraints that the {{htmlelement("output")}} control does not satisfy (if any). This is the empty string as <output> elements are not candidates for constraint validation ({{domxref("HTMLOutputElement.willValidate")}} is false).

Value

The empty string, "";

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{HTMLelement("output")}}
  • {{domxref("HTMLOutputElement")}}
  • {{domxref("HTMLOutputElement.willValidate")}}
  • {{domxref("HTMLOutputElement.validity")}}
  • {{domxref("HTMLOutputElement.checkValidity()")}}
  • {{domxref("HTMLOutputElement.reportValidity()")}}
  • {{domxref("HTMLOutputElement.setCustomValidity()")}}
  • Learn: Client-side form validation
  • Guide: Constraint validation
  • CSS {{cssxref(":valid")}} and {{cssxref(":invalid")}} pseudo-classes