From 24ea3a17b56ff7637a6aff1fbad6aceb48f88d18 Mon Sep 17 00:00:00 2001 From: Aaron Greenlee Date: Sat, 9 Jan 2016 12:30:34 -0500 Subject: [PATCH] Minor typo corrected in doc.go --- doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc.go b/doc.go index d084b83..784c481 100644 --- a/doc.go +++ b/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 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 like so err.(validator.ValidationErrors)