You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
There is a problem with the validation error messages with array fields. When I use quickForm and put an element in an Array, then validation works great. But if I add an element, remove it and add a new element, then validation no validation error message apears when the field is invalid. I guess that there is a problem with the internal counter, since there is no element that has the 0 number. In this case, my first element of the Array has the number one (example: task.1.name instead of task.0,name)
The text was updated successfully, but these errors were encountered:
I found what causes the problem. It's the AutoForm.Utility.compactArrays() function that is called before the values are inserted in the collection. This function removes the array item that have a null value because they were removed. For the moment I solved the problem by removing the line 344 in the autoform-api.js. It's the call to the Utility.compactArrays(). The only problem is that this causes the document to contain the null values. Maybe the array should be cleaned in the collection2 package? I don't what to make a pull request with this change because the function was visibly disigned to avoid that null values. But I found no solution to solve this problem exclusively in the Autoform package.
Hi,
There is a problem with the validation error messages with array fields. When I use quickForm and put an element in an Array, then validation works great. But if I add an element, remove it and add a new element, then validation no validation error message apears when the field is invalid. I guess that there is a problem with the internal counter, since there is no element that has the 0 number. In this case, my first element of the Array has the number one (example: task.1.name instead of task.0,name)
The text was updated successfully, but these errors were encountered: