-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
New error objects in rails 6.1 #93
Comments
Yes, I can confirm seeing the same issue when attempting to upgrade to rails 6.1. |
@cherbst-2112 @jamesbebbington As I mentioned here #86 (comment), I think the best approach to fix this is Anyway, this issue is related to |
Guys you can use dry validation stand-alone. It has everything what you need for this case |
And includes it's own DSL :) I considered porting all my validations to dry-validations instead but reworking them them to the new DSL was a heavier lift than fixing this library. I've posted a monkey patch in the linked reform-rails issue but there is some contention about wether it belongs there or here. The actual code change was on a class from this repo, so I think here. |
Hi there, I'm working on Reform 3.0 and I wonder if there's any place where I can find a complete definition of the
but I know there's more, like the dotted errors for nested forms, etc. Can anyone point me to better docs or simply paste a few more usage examples? 🍻 |
@apotonick I think that is this what you're looking for https://api.rubyonrails.org/classes/ActiveModel/Errors.html |
@marcelolx 💯 Thanks! ❤️ Checked it out yesterday. I remember something like those dotted errors in nested setups - do you know anything about that? Also, what if you have a nested form and you do I am making massive progress with Reform 3 and will need testers very very soon (like by the end of the week or so). Anyone? It will be in |
@apotonick I'm not aware of those dotted errors, as far as I can remember in my prior job for nested forms we used |
Closing as I'm no longer using reform. |
Thanks for maintaining this ticket, but we're addressing this very problem neatly in Reform 3. |
Complete Description of Issue
Hi, I'm trying to upgrade my reform 2.3 app to rails 6.1 and seeing a few issues. I found #86 but did not see any updates so thought I'd ask here if anyone had any ideas.
Rails 6.1 has a new errors object so they should use the new dsl, there are a few convenience methods to maintain compatibility but they are not working well with reform. Specifically
form.errors[:some_field]
if I want to see the errors on some field (it returns nil).Steps to reproduce
I reproduced the problem in a new demo rails 6.1 app, here are the relevant parts:
Expected behavior
If I add a normal active model validation the model will have an error:
Actual behavior
The form will not have an error for name:
Some methods will work correctly so it is a little confusing
System configuration
Reform version:
reform 2.3.3
reform-rails 0.2.1
The text was updated successfully, but these errors were encountered: