You could even populate an array with a bunch of values.
If, on the other hand, you are validating against a large set of values (such as your password example), then there are two options:
Sent by Jeff Grippe on 06/26/2006 01:28:51 PM:
I need to validate a form value before the user clicks submit in order to prevent a long file upload when a required password is incorrect.
The form line contains onsubmit="return validate()"
Thank you very much.