mysociety / popit

DEPRECATED - Development on PopIt has stopped and it is no longer being maintained
https://goo.gl/Vvej4Q
Other
76 stars 33 forks source link

Improve instance label validation and behaviour. #804

Closed dracos closed 9 years ago

dracos commented 9 years ago

Increase the maximum label length to 63, allow labels to start with a number, but don't allow them to end with a hyphen. Explain that hyphens are allowed in the validation text.

chrismytton commented 9 years ago

It appears that despite me saying that this should work in IRC I forgot to take into account the restriction that MongoDB places on the database name length:

Database names cannot be empty and must have fewer than 64 characters

So actually the instance slug needs to take into account the length of config.MongoDB.popit_prefix for the current environment.

chrismytton commented 9 years ago

Looks good! :+1: