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!
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
addMethod api
, .
"". , .
, , , false, - . .: http://docs.jquery.com/Plugins/Validation/Methods/required#required.28.C2.A0dependency-callback_.29