add form
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Simon Vieille 2025-07-22 16:29:10 +02:00
commit 35fb3c005f
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -25,21 +25,12 @@ type Person struct {
```golang
myForm := form.NewForm(
form.NewFieldText("Name").
WithOptions(
form.NewOption("label", "Person"),
form.NewOption("required", true),
).
WithConstraints(
validation.NewNotBlank(),
),
form.NewFieldNumber("Age").
WithOptions(
form.NewOption("label", "Age"),
form.NewOption("required", true),
).
WithConstraints(
validation.NewNotBlank(),
validation.New(),
validation.NewRange().WithMin(18),
),
).End()