Skip to content

Commit

Permalink
Validate invite key on register form (#869)
Browse files Browse the repository at this point in the history
Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>
  • Loading branch information
InfiniteStash and peolic authored Dec 19, 2024
1 parent 9e83e27 commit b777d16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/pages/registerUser/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ import { ROUTE_HOME, ROUTE_ACTIVATE, ROUTE_LOGIN } from "src/constants/route";

const schema = yup.object({
email: yup.string().email().required("Email is required"),
inviteKey: yup.string().required("Invite key is required"),
inviteKey: yup
.string()
.trim()
.uuid("Invalid invite key")
.required("Invite key is required"),
});
type RegisterFormData = yup.Asserts<typeof schema>;

Expand Down

0 comments on commit b777d16

Please sign in to comment.