You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have conditional migrations that run under feature flags. Some of these migrations need to add the optional models to validation rules for other models. Currently .validations() replaces all the validation rules which makes it hard when dealing with multiple conditional models.
Our current solution is to have "validation migrations" for each model that run 100% of the time, after all of the conditional migrations. E.g. for the page model:
Are there any plans to add an updateValidations method that fetches the existing vaidation rules and adds new rules rather than replacing the whole set of rules? I'm not sure how this would work with .items() but please let me know if you have a better solution that what we are doing now.
The text was updated successfully, but these errors were encountered:
we currently have not planned anything in this direction, but I'm happy to create a feature request for it.
Also - please feel free to open a pull request and ping me!
We have conditional migrations that run under feature flags. Some of these migrations need to add the optional models to validation rules for other models. Currently
.validations()
replaces all the validation rules which makes it hard when dealing with multiple conditional models.Our current solution is to have "validation migrations" for each model that run 100% of the time, after all of the conditional migrations. E.g. for the page model:
Are there any plans to add an
updateValidations
method that fetches the existing vaidation rules and adds new rules rather than replacing the whole set of rules? I'm not sure how this would work with.items()
but please let me know if you have a better solution that what we are doing now.The text was updated successfully, but these errors were encountered: