http://jsfiddle.net/nXqd/qC2Ya/6/
Take a look at the jsfiddle. When I enter wrong data in two inputs and clicking submit, I only receive the error message on the first one. Now I want two of them which have the name attribute in the form displayed as well.
In this example, I use the same name on purpose to get these values on the backend easier. I just loop through the list and get all information.
You are doing it wrong. You have added same name for both fields. Same name attributes are used to combine the fields in a group. You have to use class based validation.