const postSchema = new mongoose.Schema({
content: {
type: String,
trim: true
},
postedBy: {
type: mongoose.Schema.Types.ObjectId,
ref: ‘User’,
}
})
after using this code and trying to debug this again and again I am getting the same validation error for postedBy, this is happening whenever I am trying to post a tweet