setCustomValidity

open external fun setCustomValidity(error: String)(source)

The HTMLInputElement.setCustomValidity() method sets a custom validity message for the element.

MDN Reference