-
Notifications
You must be signed in to change notification settings - Fork 93
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
how to add errors in nested objects #140
Comments
The method documentation for mutations/lib/mutations/command.rb Line 109 in 87d6ecb
Unfortunately, it doesn't work correctly: the last key isn't converted to a symbol, so the error is added as Both #121 and #132 would make it work as expected, but I'm not happy merging either of them because they would break backwards compatibility. I think the right way to fix this problem is with a deprecation cycle. |
thanks could it be possible to have a similar way of doing it for arrays ? (it does not seem to be handled) |
That does seem like a natural extension to the current API 👍 are you interested in implementing it? |
lets use this example :
I'd like to use custom validation on :smoking
I'm doing this in the
validate
methodHow to add an error on key ":prefs -> :smoking" ?
Is it possible with
add_error
?The text was updated successfully, but these errors were encountered: