MCPcopy Create free account
hub / github.com/Automattic/mongoose / validate

Function validate

test/types.documentarray.test.js:494–494  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

492 const calls = [];
493 const schema = new Schema({
494 arr: [new Schema({ n: { type: String, validate(v) { calls.push(v); return true; } } })]
495 });
496 mongoose.deleteModel(/Test/);
497 const T = mongoose.model('Test', schema);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected