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

Community name validation #9159

Merged
merged 4 commits into from
Sep 10, 2024
Merged

Conversation

mzparacha
Copy link
Contributor

Link to Issue

Closes: #8967

Description of Changes

Added community name validation to only allow these characters in name

a-z A-Z 0-9 ! @ # & ( ) : _ $ \ / | .

and single spaces b/w chars

"How We Fixed It"

N/A

Test Plan

  • Create a new community - verify you get errors on invalid chars in community name
  • Update an existing community - verify you get errors on invalid chars in community name
  • Verify trending communities response doesn't return existing communities with invalid chars in community name

Deployment Plan

N/A

Other Considerations

N/A

@github-actions github-actions bot marked this pull request as draft September 9, 2024 17:35
@mzparacha mzparacha self-assigned this Sep 9, 2024
@mzparacha mzparacha marked this pull request as ready for review September 9, 2024 17:39
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, actually i move the same logic to get communities query https://github.com/hicommonwealth/commonwealth/pull/9159/files#diff-b60b043e77bd821e2ae44ad3a9ff88df3c70dda2f138c77d9568ec4ebeac3e38
to handle these existing communities cases

Copy link
Collaborator

@Israellund Israellund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mzparacha mzparacha merged commit 5572c61 into master Sep 10, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only allow alphanumeric characters for community names.
3 participants