Skip to content

Commit 8bfa88a

Browse files
authored
Update README.md (#786)
1 parent 9104fe2 commit 8bfa88a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ They return type error to avoid the issue discussed in the following, where err
4343
* http://stackoverflow.com/a/29138676/3158232
4444
* https://github.com/go-playground/validator/issues/134
4545

46-
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:
46+
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:
4747

4848
```go
4949
err := validate.Struct(mystruct)

0 commit comments

Comments
 (0)