|
|
@ -25,7 +25,7 @@ They return type error to avoid the issue discussed in the following, where err |
|
|
|
http://stackoverflow.com/a/29138676/3158232
|
|
|
|
http://stackoverflow.com/a/29138676/3158232
|
|
|
|
https://github.com/go-playground/validator/issues/134
|
|
|
|
https://github.com/go-playground/validator/issues/134
|
|
|
|
|
|
|
|
|
|
|
|
validator only returns nil or ValidationErrors as type error; so in you code all you need to do |
|
|
|
validator only returns nil or ValidationErrors as type error; so, in your code all you need to do |
|
|
|
is check if the error returned is not nil, and if it's not type cast it to type ValidationErrors |
|
|
|
is check if the error returned is not nil, and if it's not type cast it to type ValidationErrors |
|
|
|
like so err.(validator.ValidationErrors) |
|
|
|
like so err.(validator.ValidationErrors) |
|
|
|
|
|
|
|
|
|
|
|