Files
banu-front/src/features/auth/schema/index.js
T
sajjadtalkhabi a4432a30cb
Deploy banu-front / deploy (push) Successful in 1m27s
fix: mirror
2026-06-12 01:01:45 +03:30

31 lines
904 B
JavaScript

import { object, string } from 'yup'
import { passwordRule } from '@/constants/rules/passwordRule'
import { phoneNumberRule } from '@/constants/rules/phoneNumberRule'
import { passwordConfirmationRule } from '@/constants/rules/passwordConfirmationRule'
export const loginSchema = object().shape({
phone: phoneNumberRule,
password: string().required(),
})
export const loginWithCodeSchema = object().shape({
phone: phoneNumberRule,
})
export const signupSchema = object().shape({
firstName: string().required().min(3),
lastName: string().required().min(3),
phone: phoneNumberRule,
password: passwordRule,
passwordConfirmation: passwordConfirmationRule,
})
export const verifyCodeSchema = object().shape({
verifyCode: string().required().length(6),
})
export const resetPasswordSchema = object().shape({
password: passwordRule,
passwordConfirmation: passwordConfirmationRule,
})