3 ms·
A particularly annoying problem with front-end validation is that it's not difficult to circumvent the Javascript logic, check both 'None' and 'All', and send i
by wildrhythms 5y ago
A particularly annoying problem with front-end validation is that it's not difficult to circumvent the Javascript logic, check both 'None' and 'All', and send it to the server. It becomes the server's responsibility to make a decision about whether 'None' or 'All' takes precedent.
- nicoburns 5y agoIn this case the server likely doesn’t have a ‘none’ option. The none option in the client will be translated into an empty array (or false for all the other options). So circumventing the client isn’t likely to get you very far.
- alpaca128 5y agoBut 'None' is an invalid, nonexistent option on the server. It's like circumventing validation to send the option 'Foobar'. Or in other words, if the server still accepts this the problem already existed long before.