Minor typo corrected in doc.go

pull/232/head
Aaron Greenlee 9 years ago
parent e8d470cd7a
commit 24ea3a17b5
  1. 2
      doc.go

@ -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)

Loading…
Cancel
Save