我想使用MongoBee在Java中创建如下所示的验证,请帮助我
db.runCommand({
collMod: “user”,
validator: { $jsonSchema: {
bsonType: "object",
required: ["name”,”email”],
properties: {
name: {
bsonType: "string",
description: "must be a string and is required"
},
Email: {
bsonType: "string",
description: "must be a string and is required"
}
}
}},
validationLevel: "moderate"
})