Answer the question
In order to leave comments, you need to log in
How to validate a group of optional fields?
How to make it so for queries like:
{
name: "value",
field1: "value"
},
{
name: "value",
field2: "value"
},
{
name: "value",
field1: "value",
field2: "value"
},
{
name: "value"
}
Collection:
fields:
name:
- Required:
- NotBlank: ~
- Type:
type: 'string'
field1:
- Optional:
- NotBlank: ~
- Type:
type: 'string'
field2:
- Optional:
- NotBlank: ~
- Type:
type: 'string'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question