HTMLSelectElement.setCustomValidity()

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.

El metodo HTMLSelectElement.setCustomValidity() define el mensaje de validación personalizado para el elemento seleccionado con el mensaje especifico. Usa una string vacia para indicar que ese elemento no tiene error de validación customizado.

Syntax

selectElt.setCustomValidity(string);

Parameters

  • string is the DOMString containing the error message.

Especificaciones

Specification
HTML Standard
# dom-cva-setcustomvalidity-dev

Compatibilidad con navegadores

BCD tables only load in the browser

See also