-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
We should have the ability to integrate other fields into our validation rules.
Suggestion
In the example below, LastName would only be required if FirstName was set.
type Foo struct {
FirstName string `validate:"empty|max(20)"`
LastName string `validate:"FirstName.empty|not_empty,max(20)"`
}