-
-
Notifications
You must be signed in to change notification settings - Fork 3
Invalid regexName when using nested tabular data. #4
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working