Skip to content

Invalid regexName when using nested tabular data. #4

@Grunaka

Description

@Grunaka

Hi,

I have some issue when using dynamic form with nested tabular data.
The var regexName = /(^.+?)([\[\d{1,}\]]{1,})(\[.+\]$)/i; is not working well for me.
The regex is in file yii2-dynamic-form.js at line 14.

The name of my form field is "ReportTemplateGraphParameters[graph-wind-speed-correlation][0][y_id]"
As you can see on Regexp101 the regexp match include the closing bracket "]" of the previous array.
https://regex101.com/r/VyCtWA/1

If I modify to var regexName = /(^.+?)(\[\d{1,}\]{1,})(\[.+\]$)/i; this is now working.
https://regex101.com/r/lITymn/1

I am not sure if my correction is correct or cause new issues, but this is working for me.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions