4 ms·
Why would the server side code have to change for this? A none checkbox could just be translated to an empty array and passed down to the server as if none of t
by xmprt 5y ago
Why would the server side code have to change for this? A none checkbox could just be translated to an empty array and passed down to the server as if none of the options were checked.
- wildrhythms 5y agoA 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.