fix: ValidateNested do not pay attention of empty array as an item of an array #2264
Labels
status: needs triage
Issues which needs to be reproduced to be verified report.
type: fix
Issues describing a broken feature.
Description
I tried to validate some property expected as an array of objects. And ValidateNested worked ok with all invalid data except an empty array (fulfilled array was handled ok).
Minimal code-snippet showcasing the problem
Expected behavior
{ data: 11 }
- failed{ data: true }
- failed{ data: [] }
- failed{ data: [1] }
- failed{ data: [[]] }
- failed{ data: [[1]] }
- failed{ data: [true] }
- failed{ data: [{}] }
- failed{ data: [{id: ''}] }
- failed{ data: [{id: 1}] }
- passedActual behavior
{ data: 11 }
- failed{ data: true }
- failed{ data: [] }
- failed{ data: [1] }
- failed{ data: [[]] }
- passed <<<<<<<<{ data: [[1]] }
- failed{ data: [true] }
- failed{ data: [{}] }
- failed{ data: [{id: ''}] }
- failed{ data: [{id: 1}] }
- passedThe text was updated successfully, but these errors were encountered: