Using jQuery validator plugin, how to use dynamically created name attributes to assign rules?
问题 Here's the problem: The ecommerce system we uses generates a line item for each product purchased. It gives line item's quantity input the name attribute "qty0", "qty1", "qty2", and so on as the line items go down the page. I need to check these qtyX inputs for validity, but I don't know how to pass either the name attribute as a relative attribute of another attribute like a class, or pass a regex to the validate plugin to find all the quantity fields. Here's the validate code: var validator