The stupidest validation rules
Recently I wrote a book about forms usability, and I paid special attention to validation because this topic is sensitive to me.
I've been developing user interfaces for over 10 years, and almost in every project, my customers asked to put some validation on an input that didn't make sense.
I've made a small collection of the funniest, weird and stupid validation rules that I've recently found. And included some useful links at the end.
As it turned out, most of the frustrating validation rules are about user names.
The purpose of this is to make you think twice before putting extra validation rules. Because after all, if you're not making some kind of analytics application that needs very strict data collected, in most cases it's okay to let the user put what they want. It's your responsibility to parse it and correctly interpret it.
Enjoy.
![A twitter screenshot where a person says that he worked on a projects where they required at least 5 characters for first name](/img/the-stupidest-validation-rules/1.png)
![A case when a register form allowed plus sign in the email field, but didn't allow it in the login form](/img/the-stupidest-validation-rules/2.png)
![An input that doesn't allow spaces in the user name](/img/the-stupidest-validation-rules/3.png)
![An input that doesn't allow question mark as a symbol in the book name field](/img/the-stupidest-validation-rules/4.png)
![Another case of restricting space symbol in name field](/img/the-stupidest-validation-rules/5.png)
![A code sample restricting first name up to 12 characters](/img/the-stupidest-validation-rules/6.png)
![An example of not literate language](/img/the-stupidest-validation-rules/7.png)
![An example of a lot of errors displayed at once. One of them is asking for at least 5 characters for the first name](/img/the-stupidest-validation-rules/8.png)
![An example when the air company doesn't accept French language characters, even thought they are used in user's passports](/img/the-stupidest-validation-rules/9.png)
![Valid zip code is marked as invalid](/img/the-stupidest-validation-rules/10.png)
![Absence of date of birth validation](/img/the-stupidest-validation-rules/11.png)
![Not trimming input results in an error, even though visually the email field looks fine](/img/the-stupidest-validation-rules/12.png)
![Placeholder says that the field is option, while validation requires it to be filled in.](/img/the-stupidest-validation-rules/13.png)
Some useful links about validation
Falsehoods Programmers Believe About Names ( that's really awesome, even though dated 2010)
Designing Better Inline Validation UX ( my own note: Smashing Magazine is one of the best resources ever for a high quality content)
How to Report Errors in Forms: 10 Design Guidelines ( NNGroup is another solid company that does a lot of UX research. I would say NNGroup & SmashingMagazine are one of the best in this area)
Collection of useful do/donts cards for validation rules
My own article on dev.to about validation (also posted on this blog)