Hello folks I am working on an University project wherein I need to manage the course taken by the students. The application has a form to add course and delete a course sometimes I observe that students are putting same course in “add” list as well as in “remove” list how do I prevent that from happening
Here is my vdliation schema
{ IsOptional, IsArray } from "class-validator";
class courseValidate {
@IsOptional()
@IsArray()
addCourses!: string[]
@IsOptional()
@IsArray()
removeCourses!: string[]
}
I tried various custom decorator but they are not working