Mongodb – how to make required true , only if the user is certin value?
hi am making models for my mongodb , and when validating i want the birthday to be required only if the user being added is a student so i if the user is teacher it is fine if no birthday…