-
Notifications
You must be signed in to change notification settings - Fork 0
Cross field validation #22
Copy link
Copy link
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)"`
}
Reactions are currently unavailable