Skip to content

Support Schema references as Model#41

Open
trovafer wants to merge 1 commit intoCampbellSoftwareSolutions:masterfrom
trovafer:master
Open

Support Schema references as Model#41
trovafer wants to merge 1 commit intoCampbellSoftwareSolutions:masterfrom
trovafer:master

Conversation

@trovafer
Copy link

@trovafer trovafer commented May 7, 2021

Mongoose permits Schema references to be set as String or Model.
https://mongoosejs.com/docs/api/schematype.html#schematype_SchemaType-ref

This change is to support both scenarios.

@LSafer
Copy link

LSafer commented May 5, 2022

Never mind, I created https://github.com/lsafer/mongoose-extra-validators to address the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants