-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
NonStandard Validators - Import Bug #521
Labels
Comments
teejays
added a commit
to teejays/validator
that referenced
this issue
Sep 29, 2019
PR#522, if it makes sense. |
deankarn
added a commit
that referenced
this issue
Sep 29, 2019
Issue #521: Non-standard validators import path fix
1 task
Merged today and release in v9.30.0 |
fairyhunter13
added a commit
to fairyhunter13/validator
that referenced
this issue
Jul 12, 2020
fairyhunter13
added a commit
to fairyhunter13/validator
that referenced
this issue
Jul 12, 2020
Issue go-playground#521: Non-standard validators import path fix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Package version eg. v8, v9:
v9
Issue, Question or Enhancement:
When using the non-standard validators, the validation functions do not implement
go-playground/validator.v9.Func
type because the non-standard/validators package usegithub.com/andreiavrammsd/validator.Func
instead.See: https://github.com/go-playground/validator/blob/v9.29.1/non-standard/validators/notblank.go#L7
Code sample, to showcase or reproduce:
This does not compile because of:
cannot use nonstandard.NotBlank (value of type func(fl validator.FieldLevel) bool) as validator.v9.Func value in argument to validate.RegisterValidation
Fix:
Replace import of
github.com/andreiavrammsd/validator
withgo-playground/validator.v9
on here. Happy to submit a PR.The text was updated successfully, but these errors were encountered: