79499971

Date: 2025-03-11 07:49:25
Score: 1.5
Natty:
Report link

You can also write this way...and this is for typescript code const userSchema = new mongoose.Schema({ username: String, email: String, password: String, firstname: String, lastname: String, mobile: { type: Number, validate: { validator: function (v: number) { return /d{10}/.test(v.toString()); }, message: "mobile number must be exactly 10 digits" }, }, });

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Rahul Roy