-
Notifications
You must be signed in to change notification settings - Fork 141
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
breaking change to custom function now must accept &Option<T>
#310
Comments
Option<T>
&Option<T>
I thought the previous behaviour was a bug (#303) but I guess it makes more sense to handle Option that way |
I just encountered a need for custom validators to take |
That sounds like something that should be defined at the schema level. Or make it more like django forms and allow accessing other fields from any field validation function but that's a new feature. |
The latest
validator
versionv0.17.0
doesn't align with the following behavior any more for custom function.The custom function must now accept
&Option<T>
as its argument if it corresponds to the type of a struct field, in contrast to its previous behavior, which only accepted&T
even if the actual field type wasOption<T>
.The text was updated successfully, but these errors were encountered: