We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e84cf61 + c3dd6a8 commit ba763ecCopy full SHA for ba763ec
Frontend/src/components/user/EditProfile.jsx
@@ -51,7 +51,7 @@ function EditProfile() {
51
const usernameRegex = /^[a-zA-Z0-9._]{3,20}$/;
52
const isValidUsername = usernameRegex.test(username)
53
54
- if(!isValidUsername) {
+ if(!isValidUsername && username !== "") {
55
console.log("username is not valid:", username)
56
setUsernameError(true)
57
setErrorMessage("Username can only contain letters, numbers, dots (.), and underscores (_), and must be between 3 and 20 characters long.")
0 commit comments