This commit is contained in:
Iliyan Angelov
2025-11-21 01:20:51 +02:00
parent a38ab4fa82
commit 6f85b8cf17
242 changed files with 7154 additions and 14492 deletions

View File

@@ -1,8 +1,5 @@
import * as yup from 'yup';
/**
* Login Validation Schema
*/
export const loginSchema = yup.object().shape({
email: yup
.string()
@@ -18,9 +15,6 @@ export const loginSchema = yup.object().shape({
.optional(),
});
/**
* Register Validation Schema
*/
export const registerSchema = yup.object().shape({
name: yup
.string()
@@ -55,9 +49,6 @@ export const registerSchema = yup.object().shape({
),
});
/**
* Forgot Password Validation Schema
*/
export const forgotPasswordSchema = yup.object().shape({
email: yup
.string()
@@ -66,9 +57,6 @@ export const forgotPasswordSchema = yup.object().shape({
.trim(),
});
/**
* Reset Password Validation Schema
*/
export const resetPasswordSchema = yup.object().shape({
password: yup
.string()
@@ -85,7 +73,6 @@ export const resetPasswordSchema = yup.object().shape({
.oneOf([yup.ref('password')], 'Passwords do not match'),
});
// Types
export type LoginFormData = yup.InferType<typeof loginSchema>;
export type RegisterFormData =
yup.InferType<typeof registerSchema>;