-
Notifications
You must be signed in to change notification settings - Fork 183
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
Allow global configuration for dry-validation #378
Comments
As of Reform 2.3 you will be able to either monkey patch reforms base schema (https://github.com/apotonick/reform/blob/master/lib/reform/form/dry.rb#L26) or pass your own into a validation block see this test for an example: |
Dry::Validation::Schema::Form.configure do |config|
config.messages = :i18n
end |
That is handy to know, I assumed you had to define a base class as per their docs: |
wow. I just googled 'configure dry validations globally' and found my own answer ... |
@fran-worley (or someone else) |
Current dry-v version allows global configuration (useful for custom predicates and messages settings):
Currently there is no way to handle this in reform and we need manually configure each
validation
block in form.It would be much useful to set this configuration only once in global reform config.
Related discussion #377
The text was updated successfully, but these errors were encountered: