diff --git a/README.md b/README.md index c23178d9..c6e9c71c 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ Chi, Gin, Fiber and Echo are great frameworks. But since they were designed a lo ## Examples +### Hello World + ```go package main @@ -50,6 +52,8 @@ func main() { } ``` +### Simple POST + ```go package main @@ -82,6 +86,25 @@ func main() { } ``` +### With transformation & custom validation + +```go +type MyInput struct { + Name string `json:"name" validate:"required"` +} + +func (r *MyInput) InTransform(context.Context) error { + r.Name = strings.ToLower(r.Name) + + if r.Name == "fuego" { + return errors.New("fuego is not a valid name for this input") + } + + return nil +} + +``` +
All features