Quick note on this, javascript does indeed support arrays, just not used as item names.
Simple solution to this problem would be to use a php script to verify the items on the page instead, not so hard to program and way more secure in that users can't just rewrite the code to get around it.
Personaly I like to have the forms page post to itself and if there are any problems with it then just simply place all the submitted items back in their respecive places and title that item in bold red print, or whatever colour is good for contrast on your background.