Files
banu-front/src/features/student/profile/schema/index.js
T
sajjadtalkhabi c82701888a fix
2026-05-15 17:12:51 +03:30

23 lines
963 B
JavaScript

import { object, string } from 'yup'
import { phoneNumberRule } from '@/constants/rules/phoneNumberRule'
import { nationalCodeRule } from '@/constants/rules/nationalCodeRule'
import { optionalPasswordRule } from '@/constants/rules/passwordRule'
import { optionalPasswordConfirmationRule } from '@/constants/rules/passwordConfirmationRule'
export const studentProfileSchema = object().shape({
firstName: string().required().min(2),
lastName: string().required().min(2),
phoneNumber: phoneNumberRule,
nationalCode: nationalCodeRule,
birthDate: string().nullable().notRequired(),
maritalStatus: string().nullable().notRequired(),
gender: string().nullable().notRequired(),
bio: string().nullable().notRequired(),
provinceId: string().nullable().notRequired(),
cityId: string().nullable().notRequired(),
address: string().nullable().notRequired(),
password: optionalPasswordRule,
passwordConfirmation: optionalPasswordConfirmationRule,
})