fix: make admin media uploads reliable
This commit is contained in:
@@ -2,7 +2,8 @@ import { array, boolean, mixed, number, object, string } from 'yup'
|
||||
|
||||
export const courseSchema = object().shape({
|
||||
title: string().required().min(3).max(255),
|
||||
teacherId: mixed().required(),
|
||||
// The backend intentionally allows courses without an assigned teacher.
|
||||
teacherId: mixed().nullable().notRequired(),
|
||||
capacity: number()
|
||||
.typeError('ظرفیت باید بهصورت عدد وارد شود')
|
||||
.required()
|
||||
|
||||
Reference in New Issue
Block a user