Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery Validator issues with repeaters #843

Open
simonrcodrington opened this issue Sep 8, 2022 · 1 comment
Open

jQuery Validator issues with repeaters #843

simonrcodrington opened this issue Sep 8, 2022 · 1 comment

Comments

@simonrcodrington
Copy link

Hi

I've noticed when using repeaters ('limit' = 0) that there are validation issues when using the 'validation_rules' functionality. For example if you have a single field that is repeater (a text field) and apply basic validation like 'required' and minlength , the validation wont work on new items.

For example if you add an initial item the validation will work, however if you add subsequent items the validation doesn't trigger. See the image below where the first item works fine but subsequent ones do not

image

It's super inconsistent. After reloading the page, sometimes the validation for the first item wont work, but it will for the second item. See for example the image below where the validation for the first item is now lost

image

Here is how I'm setting up this repeater

image

I'm using version 1.2.5 which is an older version, is this something that's been fixed in newer versions?

@theMikeD
Copy link

I've seen the same thing in 1.5.0.

My console message is

An invalid form control with name='option[manifests][premium][proto][key]' is not focusable.

So it's looking for

option[manifests][premium][proto][key]

but the element's name attribute is

option[manifests][premium][0][key]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants