HTMLInputElement: validationMessage property - Web APIs | MDN
Value
A string.
Example
js
const input = document.getElementById("myInput");
const errorMessage = input.validationMessage;
Specifications
| Specification |
|---|
| HTML # dom-cva-validationmessage-dev |