Skip to content

Commit

Permalink
fix starting check
Browse files Browse the repository at this point in the history
  • Loading branch information
feruzm committed Feb 15, 2024
1 parent f216d65 commit 3dfbbba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/common/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@
"username-contains-symbols-error": "Should contain Letters, Numbers, Hyphen only",
"username-contains-double-hyphens": "Should not contain double Hyphens",
"username-exists": "This username already registered. Please, try another one",
"username-starts-number": "Should not start with Numbers",
"referral-invalid": "This referral is invalid. Please, try another one",
"referral-min-length-error": "Length of referral should be at least 3 characters",
"referral-max-length-error": "Length of referral should be no more than 16 characters",
Expand Down
3 changes: 3 additions & 0 deletions src/common/pages/sign-up.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ export const SignUp = (props: PageProps) => {
} else if (item.includes("--")) {
setUsernameError(_t("sign-up.username-contains-double-hyphens"));
setIsDisabled(true);
} else if (/^\d/.test(item)) {
setUsernameError(_t("sign-up.username-starts-number"));
setIsDisabled(true);
}
});
}
Expand Down

0 comments on commit 3dfbbba

Please sign in to comment.