Open n0rad opened 13 years ago
It's not a bug, array index must be unique to distinct different array items, but not used directly, document order is used instead (see readme). Why do you want to keep specified indexes?
to use js object for validation and reinject errors into html element
You can set skipEmpty parameter to false, so it will not skip empty entries, should be enough for validation/error reinjection.
Its not enough because in a dynamic form with tabs that you dynamically add and remove you may have a final result with an index [1] and [3] without a [0] and [2] for exemple
Make array with 'undefined' elements ([0] and [2]) is not ok too. Probably some deserialization method with some hook/callback function can solve this problem, will try to make something.
If you have addresses[1].street with a addresses[0].street that does not exists or is empty the result index of [1].street will be [0].street