[eluser]slowgary[/eluser]
So did you figure out your initial issue? I think when you're back to setting values on error, you can't pass an array into the set_value, because how would the function know which element in the array you were trying to refer to? I think that was the reason I tried to duplicate the iterator in the first place. At least that way you could just incrementally number your fields and loop through them to set_value()'s in your view. I could be wrong though. There's a ton of posts on the forum dealing with forms and someone has probably already touched on array keys, do some searching. This thread should be discontinued as I think we've beat the jQuery thing to death.
Good luck with your project.