Skip to content

ValidatorElement.setCustomValidity method

ValidatorElement › setCustomValidity

Sets a custom error message on the element.

Signature:

setCustomValidity(error: string): void

Parameters:

ParameterTypeDescription
errorstringThe error message to set on the element.

Returns: void