Skip to content

Commit 1725b46

Browse files
authored
Merge pull request #6 from oslabs-beta/createNewUser
Fixed user signup and pw validation bug
2 parents 173665b + aa264a6 commit 1725b46

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)