Displays an invalid HTML form control element’s validation message on focus, using the standard Constraint Validation API.
When the HTML form control element is focused it’s
reportValidity method is used to show it’s
validationMessage in a native tooltip, if the control is invalid.
This allows users to see why form fields are invalid without having to submit the form.
Useful when making form control components from scratch; it’s used by many of the form components.
React ref for the HTML form control element.