-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add BitcrowdEcto.Changeset.auto_cast/3 #55
Conversation
This patch consolidates some versions of automatic casting we had flying around. This version features casting scalars & embeds as well as required validations based on `:required` or `:optional` options. Additionally, this adds `BitcrowdEcto.Assertions.assert_cast_error_on/2`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice function. I can imagine a couple of use cases for this but what's the use case you had in mind?
Left a blocker
. More than requesting changes is an question.
Co-authored-by: Alfonso Manuel <[email protected]>
Use-case is documented here https://bitcrowd.atlassian.net/browse/SIS-4357, but the code originated in another project and has existed in some variant in all our PDF/mail apps for ages. |
I see, thanks for the reference. I am not a big fan of the |
Open for other names, but just I thought |
Co-authored-by: Alfonso Manuel <[email protected]>
Sounds good, either that or |
renamed to |
This patch consolidates some versions of automatic casting we had flying around. This version features casting scalars & embeds as well as required validations based on
:required
or:optional
options.Additionally, this adds
BitcrowdEcto.Assertions.assert_cast_error_on/2
.