Closed mtnptrsn closed 6 years ago
The custom message doesn't work when using it on a nested object within a mongoose schema.
Ex:
const userSchema = new Schema({ /* |---------------------- | Structure |---------------------- */ general: { firstName: { type: String, required: true }, lastName: { type: String, required: true }, email: { type: String, required: true, unique: 'Mailen du angav finns redan.' }, } });
Do I need to stop using nested objects or is there another way?
Hi @mtnptrsn, thanks for reporting, and sorry for taking time to answer. I believe the issue you describe is fixed in version 7.1.1. If it doesn’t, please feel free to reopen!
The custom message doesn't work when using it on a nested object within a mongoose schema.
Ex:
Do I need to stop using nested objects or is there another way?