Skip to content

Commit aa264a6

Browse files
committed
Fixed user signup and pw validation bug
Co-authored-by: Jon Cruz [email protected] Co-authored-by: Elena Atencio [email protected] Co-authored-by: John Donato [email protected]
1 parent 173665b commit aa264a6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/components/SignUp.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ const SignUp:React.FC = React.memo(() => {
2222
// eslint-disable-next-line no-return-assign
2323
inputFields.forEach(input => (input.value = ''));
2424

25+
if (!password) {
26+
setFailedSignUp(<p>Please enter valid password</p>)
27+
return;
28+
}
2529
if (password !== confirmPassword) {
2630
setFailedSignUp(<p>Entered passwords do not match</p>);
2731
return;

0 commit comments

Comments
 (0)