On the bright side, it could potentially help me to ditch FB once and for all.
1. Duplicate the server input constraints on client side and synchronize them manually. The easiest one to implement, potentionally difficult to maintain.
2. Expose new endpoint on server with all the constraints (allowed lengths/regex patterns), which will client load and store at the first load.
3. Validate input dynamically on server by making AJAX call on change of input. I want to avoid this one, as it could increase traffic a lot.
Thoughts/experiences on this problem?
This type of question has been intriguing me for some time, as I feel almost everybody deep down thinks he is not a genius, but he still knows better than average Joe. I would be really curious if there were surveys with this question and how would different countries compare in results.