-
Notifications
You must be signed in to change notification settings - Fork 521
Description
There are two instances I found where validation logic for codes is inconsistent across languages:
-
Automatically expanding requested short code length if odd. Most of the
language implementations automatically add 1 to the length of requested codes
if the length indicates it is in the pair part of the code. Java, C++, Python,
and Javascript are the outliers. -
Validate latitude and longitude bounds within validation logic for full
codes. Most of the language implementations only check the first two characters
for latitude/longitude bounds when within the validation logic for full codes,
not when generally checking if codes are valid. This does introduce a strange
case where a code is "valid", but is neither a valid short nor a valid long
code. C++ is the outlier here.
I have a PR out to fix this: