Skip to content

/country/add: prohibit repeated special characters #403

Closed
@php-coder

Description

@php-coder

Currently user can specify name with multiple spaces inside, for example test 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:

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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions