Constraint Validation API
The most robust way to validate a form field in the browser is to write a validation function. You can use validation functions in conjunction with the Constraint Validation API to trigger built-in validation behavior.
But there is a catch, and it is not a small one: The Constraint Validation API has poor support in Apple’s Safari browser.
Suppose your coffee truck is only for employees of your company, so you want to make ...