fix validation of arrays of objects