Updated the documentation for the CheckWithConfig function. (#160)
# Describe Request Updated the documentation for the CheckWithConfig function. # Change Type Documentation improvement.
This commit is contained in:
parent
b14b02d03c
commit
21065d3d76
1 changed files with 12 additions and 0 deletions
12
README.md
12
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue