Skip to content

Commit

Permalink
Fix documentation. (#125)
Browse files Browse the repository at this point in the history
# Describe Request

Fix documentation for the new error return types.

# Change Type

Documentation update.
  • Loading branch information
cinar authored Oct 30, 2024
1 parent da76950 commit 0c362a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ If you do not want to validate user input stored in a struct, you can individual
```golang
var name

result := checker.IsRequired(name)
if result != ResultValid {
err := checker.IsRequired(name)
if err != nil {
// Send the result back to the user
}
```
Expand Down Expand Up @@ -114,8 +114,8 @@ This package currently provides the following normalizers. They can be mixed wit
To define a custom checker, you need to create a new function with the following parameters:

```golang
func CustomChecker(value, parent reflect.Value) Result {
return ResultValid
func CustomChecker(value, parent reflect.Value) error {
return nil
}
```
type MakeFunc
Expand Down

0 comments on commit 0c362a1

Please sign in to comment.