Updates the element's visual validity indication based on its current validity state.
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.