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.