Replies: 2 comments
-
I see there are couple of options. 1. use
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I try to keep it in line with how Rails works. In fact, the validation is straight out of Rails. @antulik gave a good response. I think generally this would be outside of the scope of this gem and more of a Rails question. Thanks for the question! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have got an interaction that does a lot of different things with an email
All the errors scattered across the logic. I'd like to get only the first error, probably, stop all other validations at some point. Fair enough, I can bypass it by asking
errors.messages[:email]
to beblank?
or callingreturn
ornext
at some point.Perhaps this is not even the extension that should be added here, and it is related more to validations mechanism rather than to this gem. But since this idea came to me while I was working with it that is what i'd like to see to reduce the boilerplate:
Even if it is not the right place, may be someone will be inspired by this topic, and implement it somewhere else, or redirect me to the correct place for such a discussion. May be, if it is more or less appropriate I will implement it by myself.
Beta Was this translation helpful? Give feedback.
All reactions