Feat: Update user validation schema to include username/email check

The validation schema will throw an error if the username or email is already found in the database.
This commit is contained in:
Aaron William Po
2023-05-11 22:21:49 -04:00
parent 2eb2626d54
commit 9574bbaeb9
9 changed files with 226 additions and 59 deletions

View File

@@ -26,11 +26,11 @@ const AccountInfo: FC<{
>({
resolver: zodResolver(GetUserSchema),
defaultValues: {
username: 'test',
email: 'test@example.com',
firstName: 'test',
lastName: 'icle',
dateOfBirth: new Date(),
username: user.username,
email: user.email,
firstName: user.firstName,
lastName: user.lastName,
dateOfBirth: user.dateOfBirth,
},
});