colinaut / alpinejs-plugin-simple-validate

Simple Alpine form validation plugin
97 stars 4 forks source link

An error occurs if the name attribute contains [] like "name[last_name]" #16

Closed nomin-sasabuchi closed 1 year ago

nomin-sasabuchi commented 1 year ago

We become indebted to. It is also in the title, but if the name attribute contains [], an error will occur. Is this the specification? Also, can this be fixed?

colinaut commented 1 year ago

Thanks for the bug report. Fixed! New 1.7.21 release should work for you

What was happening: The [] means something different when using querySelector so it was breaking. I only needed to find by id in my code there so I switched to getElementById and that fixes the issue, and makes the code a bit more concise too which is nice.