Hacker News new | past | comments | ask | show | jobs | submit login

Don't we already have that basically, with HTML5 form validation[1]? Often just using the pattern attribute is enough to make sure you don't get a phone number in your email field etc.

1: https://developer.mozilla.org/en-US/docs/Learn_web_developme...






Yes, but it's user agent UI which is not really good in any of them.

Good error messaging is important and having styleable semantic elements would be helpful. It's tricky because you often need more than one error message per input, not just "required" but too big, too small, wrong format, etc.


Right. You can use browser validation and extract the error messages with JavaScript (to style them yourself, e.g. [1]), but there’s no solution without JS yet.

[1]: https://github.com/notpushkin/evilmartians-exercise-auth/blo...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: