From 8bfa88a4625f68c78a48465da418c75b734743b8 Mon Sep 17 00:00:00 2001 From: Levani <49454484+arx111@users.noreply.github.com> Date: Thu, 8 Jul 2021 01:26:48 -0400 Subject: [PATCH] Update README.md (#786) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0bf8a7b..45c11aa 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)