-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/country/add: prohibit repeated special characters #403
Comments
We should transform multiple hyphens and underscores too. |
When we talked about replacing multiple spaces it sounded ok, but when we decided to replace hyphens and underscores too, it has changed the situation. Such implicitly behavior can puzzle user, especially with login field: user wishes to use To make the user experience more transparent let's add validation for it: show an error when field contains repeatable characters. |
No-no-no. We can't do that because it will broke existing logins and also change URLs of some categories/countries (and they start to return 404 instead of do a redirection). |
We'll improve validation of |
We'll improve validation of category's names in #465 |
Currently user can specify name with multiple spaces inside, for exampletest test
. We should disallow it (probably just replacing them by one) and also add migration for that.When user specifies the names of country during its creation, we should validate these names and prohibit the repetition of the hyphen (for example:
te--st
). Also we should add the converter that will replace two and more spaces into single.Note that we should apply this conversion/validation to the both fields.
What should be done:
@Pattern
will be helpful)The text was updated successfully, but these errors were encountered: