Errors in multidimensional array items not properly reported #67

tidoust opened this Issue Jul 17, 2013 · 0 comments


None yet

1 participant

tidoust commented Jul 17, 2013

See #62 for an example of JSON Form object that contains a nested array. The map[][].index key only accepts numbers. That is correctly enforced when the form is submitted but the error is not reported back into the form.

@tidoust tidoust pushed a commit that referenced this issue Jan 3, 2014
François Daoust Fine-tuned fix of errormarkerclass for nested arrays (#67 and #102)
Many thanks for the pull request, @flisky. The line you fixed was
indeed the line that caused problem. However, while the "g" flag is
indeed needed to support nested arrays, that was not enough to
produce the right output.

Typically, the goal is to generate something like "map[0][0].index"

The first two regular expressions turn the input into:

Just adding the "g" flag to the final regular expression woud not
really change anything in most cases, leading to:

The following "." should not have been part of the match, I added the
right lookahead pattern. That seems to work fine in the forms I tried.
@tidoust tidoust closed this Jan 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment