-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
validateProvidedData with mongoose format #44
Comments
Just to try, I replaced Line 107 in e914d74
Works like a charm. A refactor may be done with ease to provide methods like this:
What do you think? I may work on a PR for this. |
I just made a proposition in #45 |
If anyone is also stuck by this limitation, here is an hacky workaround: # To be run by postinstall
#!/usr/bin/env sh
set -e
# Hack to be remove when both format will be supported.
# @see https://github.com/feathersjs-ecosystem/validate-joi/pull/45
sed -i 's/validators\.form/validators.mongoose/' node_modules/feathers-validate-joi/index.js Then However, this solution does not work if you need both formats. |
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. |
As specified on the doc, the
validate.validateProvidedData
method provides the same result asvalidate.form
.However, I am using
validate.mongoose
because I prefer this format.Because of this, I can not use the partial validation feature you propose.
Is that a reason to not support mongoose format for
validateProvidedData
?Thanks
The text was updated successfully, but these errors were encountered: