From d074a0559a025e1c32ec20467677144f1664f120 Mon Sep 17 00:00:00 2001 From: Levani <49454484+arx111@users.noreply.github.com> Date: Fri, 18 Jun 2021 16:34:39 -0400 Subject: [PATCH] Update README.md Missing word in the "Error Return Value" section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 15d9fbb91..d53918c59 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,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 InvalidValidationError for bad validation input, 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 check if error is InvalidValidationError ( if necessary, most of the time it isn't ) type cast it to type ValidationErrors like so: +Validator returns only InvalidValidationError for bad validation input, 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 check if error is InvalidValidationError ( if necessary, most of the time it isn't ) type cast it to type ValidationErrors like so: ```go err := validate.Struct(mystruct)