Skip to content

Commit

Permalink
fix: dont show errors on empty input in signup page
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcl-io committed Mar 22, 2021
1 parent afc255e commit fe9a89c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/views/Signup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ const Signup = () => {
value={values.username}
onChange={handleChange}
onBlur={handleBlur}
error={touched.username && !!errors.username}
error={values.username.length > 0 && !!errors.username}
helperText={
touched.username &&
values.username.length > 0 &&
errors.username &&
errors.username.charAt(0).toUpperCase() + errors.username.slice(1)
}
Expand All @@ -148,9 +148,9 @@ const Signup = () => {
value={values.password}
onChange={handleChange}
onBlur={handleBlur}
error={touched.password && !!errors.password}
error={values.password.length > 0 && !!errors.password}
helperText={
touched.password &&
values.password.length > 0 &&
errors.password &&
errors.password.charAt(0).toUpperCase() + errors.password.slice(1)
}
Expand All @@ -165,9 +165,9 @@ const Signup = () => {
value={values.password2}
onChange={handleChange}
onBlur={handleBlur}
error={touched.password2 && !!errors.password2}
error={values.password2.length > 0 && !!errors.password2}
helperText={
touched.password2 &&
values.password2.length > 0 &&
errors.password2 &&
errors.password2.charAt(0).toUpperCase() + errors.password2.slice(1)
}
Expand Down

0 comments on commit fe9a89c

Please sign in to comment.