Skip to content
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

/category/add: prohibit repeated special characters #465

Closed
php-coder opened this issue Aug 26, 2016 · 5 comments
Closed

/category/add: prohibit repeated special characters #465

php-coder opened this issue Aug 26, 2016 · 5 comments
Assignees
Milestone

Comments

@php-coder
Copy link
Owner

When user specifies the names of category 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:

  • Add integration tests
  • Add validation (@Pattern will be helpful)

(Extracted from #403)

@bodom91
Copy link
Contributor

bodom91 commented Aug 26, 2016

Hmm...
Maybe I will need add warning message - Value must not contain repetition of hyphen
Perhaps user want name te--st but not te-st ...
What do you think about that ?

@php-coder
Copy link
Owner Author

Maybe I will need add warning message - Value must not contain repetition of hyphen

Warning means that user can ignore it, that this is something optional. But it should be mandatory. To understand more about why we need it, read my comments in the #403

Perhaps user want name te--st but not te-st ...

Note that now we're talking about country name (and not the user's login). Do you know the country that has two hyphens in its name?

P.S. "user wantS"

@bodom91
Copy link
Contributor

bodom91 commented Aug 26, 2016

The title of issue /category/add: prohibit repeated special characters
???))

@php-coder
Copy link
Owner Author

Ah, yes, I'm sorry, I've mixed the issues because they're similar. But the point is still valid: name of the category is something meaningful and from the real life (for example, Sport, Cars, Holidays, etc).

@bodom91
Copy link
Contributor

bodom91 commented Aug 26, 2016

Ok, will be done. =)

php-coder added a commit that referenced this issue Sep 26, 2016
Should be in c8f2dca commit.

Addressed to #465

No code changes.
cssru pushed a commit to cssru/mystamps that referenced this issue Oct 5, 2016
cssru pushed a commit to cssru/mystamps that referenced this issue Oct 5, 2016
bodom91 added a commit to bodom91/mystamps that referenced this issue Aug 2, 2017
bodom91 pushed a commit to bodom91/mystamps that referenced this issue Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants