JQuery Validation - At least one input with the same name is required

I use the jQuery Validation plugin and have a series of inputs with the same name in the array, for example 5 inputs with name = "name []"

I want to have at least one of them. Does anyone know how to do this? Thank!

+1
source share
3 answers

You can formulate it in a more general sense as "at least X inputs that match the selector Y must be filled." (In your case, X is 1, and Y is “with a specific name.”)

I addressed a general problem:

jQuery Validate - At least one field in a populated group is required

+1
source

addMethod api

, .

0

All Articles