HTMLObjectElement: validationMessage property

Baseline 2023

Newly available

Since March 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

The validationMessage read-only property of the HTMLObjectElement interface returns a string representing a localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candidate for constraint validation (willValidate is false), or it satisfies its constraints.


A string.


HTML Standard
# dom-cva-validationmessage-dev

Browser compatibility

BCD tables only load in the browser