Constraint validation API
Using the native validation API, we can:
- Sets a custom error message with
setCustomValidation(). - Checks fields validation state with
checkValidity(). - Listen for form submit and input change events to validate fields.
Using the native validation API, we can:
setCustomValidation(). checkValidity().