Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dedsecrattle committed Oct 6, 2024
1 parent 19f59e6 commit 6c22098
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 4 additions & 2 deletions frontend/.env.sample
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
PORT=3000
REACT_APP_QUESTION_SERVICE_URL=http://localhost:3002
REACT_APP_USER_SERVICE_URL=http://localhost:3001

# local server addresses
# REACT_APP_QUESTION_SERVICE_URL=http://localhost:3002
# REACT_APP_USER_SERVICE_URL=http://localhost:3001

# In docker
REACT_APP_QUESTION_SERVICE_URL=http://localhost/api/questions/
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/util/user.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ export const validatePassword = (password: string): string | null => {
if (!password) {
return "Password is required.";
}
const passwordRegex = /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/;
return passwordRegex.test(password)
? null
: "Password must be at least 8 characters long and contain letters and numbers.";
return password.length >= 8 ? null : "Password must be at least 8 characters long";
};

export const validateAvatar = (avatar: string): string | null => {
Expand Down

0 comments on commit 6c22098

Please sign in to comment.