Open flight9 opened 6 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Apologies if the issue could not be resolved. FeathersJS ecosystem modules are community maintained so there may be a chance that there isn't anybody available to address the issue at the moment. For other ways to get help see here.
any idea?
Steps to reproduce
There is a Users Schema in my project with a
password
field which is set to 'required: true'. Now I have to create a list of users using data from an excel file which does not offer anypassword
value (because the boss hopes no password can be touched by client users). So I have to skip the mongoose validation when I call feathers service to create a user. I found in docs here thatparams.mongoose
will help (see https://github.com/feathersjs-ecosystem/feathers-mongoose#paramsmongoose). I use the code:but it still validates the doc and throw an error
Path password is required
.Expected behavior
Passing
validateBeforeSave:false
viaparams.mongoose
should skip mongoose validating before creating.Actual behavior
Passing
validateBeforeSave:false
viaparams.mongoose
does not work.System configuration
Version node.js: 8.9.3 mongoose: 5.2.3 MongoDB: 3.6.1 feathers-mongoose: 6.1.2