-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: implement ValidatorValuer interface feature #1416
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
base: master
Are you sure you want to change the base?
Conversation
7222de7 to
a4b2773
Compare
zemzale
left a comment
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.
The good looks good.
My only concerns would maybe be the naming of the interface and it's function.
a4b2773 to
2996074
Compare
2996074 to
62dc169
Compare
|
Do we have any updates on this? |
62dc169 to
05867e9
Compare
Still waiting for review by @go-playground/validator-maintainers |
zemzale
left a comment
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.
The code itself is good.
Just not fully sure about the whole thing just as written in the discussion, that this is very implicit API that would tie in the validator with your types.
Would want more opinions on this before merging.
Problem
In order to have custom type validations for generic types, every possible type has to be registered with
RegisterCustomTypeFuncto return the underlying type. It is especially relevant for nullable types e.g.sql.Null[T].Discussed here: #1232
Fixes Or Enhances
ValidatorValuerinterface.Example:
Make sure that you've checked the boxes below before you submit PR:
@go-playground/validator-maintainers