ebird-api icon indicating copy to clipboard operation
ebird-api copied to clipboard

Location code regex are not correct

Open marmg opened this issue 8 months ago • 0 comments

Hello, I see in validation.py that the code for checking if it's a subnational code is:

def is_subnational2(value):
    return re.match(r"^[A-Z]{2}-[A-Z0-9]{2,3}-[A-Z0-9]{2,3}$", value)

However, some location codes (like in Ireland) contain only 1 letter: IE-L-DN

marmg avatar Jun 19 '25 12:06 marmg