MCPcopy
hub / github.com/Automattic/mongoose / validate

Method validate

types/models.d.ts:657–657  ·  view source on GitHub ↗

Casts and validates the given object against this model's schema, returning the casted-and-validated copy of `obj`, passing the given `context` to custom validators.

()

Source from the content-addressed store, hash-verified

655
656 /** Casts and validates the given object against this model's schema, returning the casted-and-validated copy of `obj`, passing the given `context` to custom validators. */
657 validate(): Promise<TRawDocType>;
658 validate(obj: any): Promise<TRawDocType>;
659 validate(obj: any, pathsOrOptions: PathsToValidate): Promise<TRawDocType>;
660 validate(obj: any, pathsOrOptions: { pathsToSkip?: pathsToSkip }): Promise<TRawDocType>;

Callers 15

getFunction · 0.80
SchemaTypeFunction · 0.80
schemaType.jsFile · 0.80
query.jsFile · 0.80
documentArray.jsFile · 0.80
subdocument.jsFile · 0.80
doValidateMethod · 0.80

Calls

no outgoing calls

Tested by 8

gh12590Function · 0.64
gh14496Function · 0.64
gh14003Function · 0.64
gh8768Function · 0.64
gh12590Function · 0.64
gh14496Function · 0.64