From 21065d3d76c66b93635157746d37fd415fbb6e82 Mon Sep 17 00:00:00 2001 From: Onur Cinar Date: Mon, 30 Dec 2024 12:58:36 -0800 Subject: [PATCH] Updated the documentation for the CheckWithConfig function. (#160) # Describe Request Updated the documentation for the CheckWithConfig function. # Change Type Documentation improvement. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index f01025a..395b858 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,18 @@ if err != nil { } ``` +The checkers and normalizers can also be provided through a config string. Here is an example: + +```golang +name := " Onur Cinar " + +name, err := checker.CheckWithConfig(name, "trim requied") +if err != nil { + // Handle validation error +} + +``` + ### Validating Individual User Input For simpler validation, you can call individual checker functions. Here is an example: