Skip to content

Commit

Permalink
Fixed validation schema for codeOfConductAcknowledge (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelaenlle authored Feb 9, 2025
1 parent 9a28267 commit 27b9b92
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/AcceptRSVPForm/AcceptRSVPForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ const schema = yup.object({
discordTag: yup.string().required("Please enter your discord tag"),
avatarId: yup.string().required("Please choose an avatar"),
codeOfConductAcknowledge: yup
.string()
.oneOf(["YES"], "You must accept the Code of Conduct")
.array()
.of(yup.string())
.min(1, "You must accept the Code of Conduct")
.required("You must accept the Code of Conduct")
});

Expand Down

0 comments on commit 27b9b92

Please sign in to comment.