Skip to content

24 ways to impress your friends

Vote up?

bruce

All good points, Adam. And you’re right – built-in validation doesn’t cover every conceivable use case. It isn’t designed to; HTML5 makes unabashed use of the 80/20 rule.

So, consider this comment form; it has three required fields (name, email, message). One is input type=email, one is email type=url. Those are all taken care of by the new form types. I would be willing to bet that the “comment form”/ contact us form already makes up the majority of web forms.

Additionally, with built-on date pickers, pattern validation (think customer IDs, part numbers, credit card numbers, catalogue numbers, postcodes) that comfortably gets up to 80%.

The spec has bunch of methods and properties, as you say, that allow custom validation. It has nothing to say about how browsers should display or style errors; that is up to browser vendors.