-
Notifications
You must be signed in to change notification settings - Fork 28
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
Validation is not being enforced #57
Comments
Hi @gunar, validation is not something the current liana manage properly. As you may notice, we have a PR in review to support simple validations here: #35 But you seem to have complex validations. We would love to have a small example of your complex validation to help us implement it. 🌲🌲🌲 |
Hi @arnaudbesnier Why it is needed to implement code for validation? |
@gunar sorry for the misunderstanding... The PR I showed you is a feature to improve the validation experience. You are right, as the liana is based on the Mongoose ORM. It means that the validations you defined in your models should work while using Forest. Can you provide a simple code example based on your code, that we could use to reproduce the issue? |
Thank you for the feedback Validator on insert worksCreate Validator on update does not workCreate |
@gunar Ok I think I found the reason why the validations are not triggered on record update. I think the method Let me reproduce and fix this week. |
@gunar can you check if the PR fixes your issue? |
The fix has been release in the 1.1.5 liana version. Here are the changelogs. |
Hi, is there a way to make sure ForestAdmin adheres to my models' custom validators?
I thought this should work out-of-the-box since this is a mongoose plugin, not just mongo.
For example, I have a validation that makes sure codes are unique across three collections.
Thank you for ForestAdmin. Love it!
Don't know how nobody thought of it before.
The text was updated successfully, but these errors were encountered: