HTML Input Validation with JavaScript

from blog Aleksandr Hovhannisyan, | ↗ original
Validate user input in real time with the checkValidity, reportValidity, and setCustomValidity methods.