dieyoudie, you may not have to keep track of the values.
It depends on what you are testing for but since you can only type one key at a time you only need to check the last character entered and therefore do not have to keep track of every current value in every field.
The one exception I can think of is if someone pasted information into a field. You can probably trap an event like that though which would let you know if you needed to test just the last character or all characters.
Now, one last thought. If you use onkeyup, you could check the entire string every time onkeyup is detected.
Sure it is technically cumbersome to do your checks at every single keystroke as they potentially type in a lot of info. It depends really on how much testing you are doing.
If you just test for invalid characters then the check is very fast especially if the fields are not real long.
Control should get back to the field before the client hits the next key.