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
I was using "#index" as the child_index option, to distinguish it from normal names (I'm doing some javascript fiddling to replace the "#index" with something proper later on).
I noticed the hints weren't being properly translated. Looking through the old issues I found #245 and #246, which looked similar to my issue. I realized it was because the regex /(?!\d)\w+/ would only match word-characters, so it didn't match the #-character.
I monkey-patched the regex to /(?!\d)[\w#]+/ or even /(?!\d)[^\[\]]+/ which fixed my issue.
Not sure if SimpleForm should be more tolerant of special characters in child_index or not, but I just wanted to raise it in case other people encountered this problem.
The text was updated successfully, but these errors were encountered:
Environment
Current behavior
In form_builder.rb there's the following code:
I was using
"#index"
as thechild_index
option, to distinguish it from normal names (I'm doing some javascript fiddling to replace the"#index"
with something proper later on).I noticed the hints weren't being properly translated. Looking through the old issues I found #245 and #246, which looked similar to my issue. I realized it was because the regex
/(?!\d)\w+/
would only match word-characters, so it didn't match the#
-character.I monkey-patched the regex to
/(?!\d)[\w#]+/
or even/(?!\d)[^\[\]]+/
which fixed my issue.Not sure if SimpleForm should be more tolerant of special characters in
child_index
or not, but I just wanted to raise it in case other people encountered this problem.The text was updated successfully, but these errors were encountered: