HTMLObjectElement:validationMessage 属性

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since December 2018.

HTMLObjectElement 接口的 validationMessage 只读属性返回一个表示描述控件不满足的验证约束(如果有的话)的本地化消息字符串。如果控件不是约束验证(willValidatefalse)的候选者,或者它满足其约束,则此字符串为空。

一个字符串。

规范

Specification
HTML
# dom-cva-validationmessage-dev

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
validationMessage

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support