From cc5df3ce077d337107787b35583c26646eb59799 Mon Sep 17 00:00:00 2001 From: Onur Cinar Date: Tue, 29 Oct 2024 20:04:15 -0700 Subject: [PATCH] Fix documentation. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4c2fbb0..6f209e4 100644 --- a/README.md +++ b/README.md @@ -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 } ``` @@ -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