colinaut / alpinejs-plugin-simple-validate

Simple Alpine form validation plugin
97 stars 4 forks source link

List items created by Alpine's x-for are not picked up for validation? #30

Open AkosLukacs opened 1 month ago

AkosLukacs commented 1 month ago

Hi,

I want to create a form, where the users can enter data for multiple items. Here is a simple example, where user can push the "Add dynamic item" button, and a new name and description field is added for a new item: https://github.com/AkosLukacs/alpinejs-plugin-simple-validate/blob/items/examples/dynamic.html

But the validator seems to ignore these form fields. The behaviour is the same, if the list is empty or has an initial item: the validator ignores the items.

colinaut commented 1 month ago

Thanks. I'll add this as a bug and look at it when I have time. Note that my schedule is really busy for the next while so I may take me a bit to get to it.