CLASSROOMIO-T-152: Landing page fully ready

This commit is contained in:
Rotimi Best
2023-09-15 08:26:26 +01:00
parent 90274d7ef4
commit 6db697bc6c
18 changed files with 510 additions and 70 deletions
+16
View File
@@ -134,6 +134,22 @@ export const authValidation = (fields = {}) => {
return processErrors(error);
};
export const coursePaymentValidation = (fields = {}) => {
const schema = z.object({
fullname: z.string().min(6, {
message: 'Must be 6 or more characters long',
invalid_type_error: 'Must not be empty'
}),
email: z.string().email({
message: 'Invalid email address',
invalid_type_error: 'Must not be empty'
})
});
const { error } = schema.safeParse(fields);
return processErrors(error);
};
export const resetValidation = (fields = {}) => {
const { error } = resetValidationSchema.safeParse(fields);