Reason for place rule "Name cannot start with a number"?

Some places names start with a number. Curious what the reason is to disallow adding places that start with a number, as long as they have other text than just a number, so as not to be confused with the place_ids. Thanks!


I have also wondered about the reasoning for the rule. Never mind…
I just realized the reason.

Care to share your insight with the rest of us?

for what it’s worth, any place has a separate Name and Display Name. as far as i can tell, the Display Name can start with a number. so you could set up a place with a Name that begins with a non-number but still begin its Display Name with a number. the only things that i can tell the Name is being used for (though i didn’t look very hard) are (in part) the place slug (the alternative reference to place id), links to Wikipedia, and possibly links to match up with Google places.

this is the discussion that revealed a need to handle place names that were numeric: there’s a Github issue referenced in that thread, which was originally written to disallow purely numeric names, but which was modified and implemented to disallow names beginning with numbers.

it’s not noted why exactly the issue was modified, but i suspect it has to do with the place slug being based (in part) on the place name. a lot of points in the system will dynamically respond to either a place id or a place slug. probably the way the system decides whether to treat an input as a place id or a place slug is by look at whether it starts with a number. it’s probably a much bigger change to change the way the system distinguishes between id or slug than to simply prevent names that begin with numbers (thereby preventing slugs beginning with numbers). just guesses…

EDIT: actually, i’m looking at the Github issue, and it doesn’t look like it was officially noted as being closed, although there definitely is a validation in the place screen that prevents names beginning with numbers. i’m not going to dig through the code and all the history for it, but maybe this validation is not actually new? maybe it was there already, and maybe the problem place was added via a process that did not involve the usual place creation / edit screen?

1 Like

Thank you for the reply!

It’s a bit deeper into the programming side than I get, but my intellectual curiosity is satisfied.

Sorry I have not checked iNat forum lately.
My reasoning:
It just seems easier to look at an alphabetical listing for a place rather than an alphabetical / numerical “index”.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.