Skip to content

Commit

Permalink
changed validation on age field
Browse files Browse the repository at this point in the history
  • Loading branch information
pm3512 committed Jan 1, 2024
1 parent 2f2ff34 commit 03607a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/form/ApplicationForm/BasicSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ const BasicSection = ({
valid = false
setAgeErrorStatus(true)
setAgeHelper("Please enter a valid age")
} else if (age && ageNum < 18) {
valid = false
setAgeErrorStatus(true)
setAgeHelper("You must be at least 18 years old to apply")
} else {
setAgeErrorStatus(false)
setAgeHelper("")
Expand Down

0 comments on commit 03607a8

Please sign in to comment.