Search.../

resetValidityIndication( )

Resets the element's visual validity indication.

Description

Many elements have a visual cue that indicates whether they are valid or not. For example, a text input that usually has a black outline might have a red outline when its value is not valid.

The resetValidityIndication() function resets the validity indication of an element to show the element as valid. The actual validity state of the element is not affected. If the element was invalid, it remains invalid. The validity indication shows the element as valid until the element's validity is checked when the value of the element changes either by user interaction or programmatically. At that point, the element's validity indication shows the element as invalid if its value is not valid.

Syntax

function resetValidityIndication(): void

resetValidityIndication Parameters

This function does not take any parameters.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

Reset an element's validity indicator

Code Example

Copy Code
1$w("#myElement").resetValidityIndication();