Open tremby opened 8 years ago
Since the input is a drop down unless you allow users to input the data, then there is no way to know it's correctness without looking and checking as human. To check the accuracy using the data the options come from would only reinforce that the data comes from this list. which seems redundant. The list is supposed to use ISO3166-2 codes so you could maybe do something with that?
I was more thinking along the lines of if the package were to provide a validate
function which takes a country and region as selected from the dropdown it provides, and returns true or false depending whether those values make sense given the data in the package.
Given that this is being used on the client side and then data sent to the server, once on the server side, can I use this module in Node to validate the input data? How would I go about doing that?