Skip to content

fix(username): change validations for username#185

Merged
mohamed-sameh-albaz merged 3 commits intodevfrom
fix/trends
Dec 15, 2025
Merged

fix(username): change validations for username#185
mohamed-sameh-albaz merged 3 commits intodevfrom
fix/trends

Conversation

@mohamed-sameh-albaz
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 15, 2025 18:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates username validation rules to allow hyphens in usernames and prevent consecutive special characters (including hyphens). The regular expressions in the @Matches decorators are modified to include hyphens in both the allowed character set and the consecutive character restriction.

Key changes:

  • Updated regex patterns in two DTO files to support hyphens as valid username characters
  • Extended consecutive character validation to include hyphens alongside dots and underscores

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/user/dto/update-username.dto.ts Updated validation regex to allow hyphens and prevent consecutive special characters including hyphens
src/user/dto/update-user.dto.ts Updated validation regex to allow hyphens and prevent consecutive special characters including hyphens

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

mohamed-sameh-albaz and others added 2 commits December 15, 2025 20:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mohamed-sameh-albaz mohamed-sameh-albaz merged commit 2a72a52 into dev Dec 15, 2025
1 check 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.

2 participants