updates
This commit is contained in:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user