Skip to content

Instantly share code, notes, and snippets.

@wjlafrance
Created February 18, 2012 22:21
Show Gist options
  • Save wjlafrance/1861157 to your computer and use it in GitHub Desktop.
Save wjlafrance/1861157 to your computer and use it in GitHub Desktop.
// fast-fail boolean checking makes me do horrible things
var valid = true;
valid = validate_username(form.txtUsername) && valid;
valid = validate_email(form.txtEmail) && valid;
valid = validate_phone(form.txtPhone) && valid;
valid = validate_address(form.txtAddress) && valid;
valid = validate_city(form.txtCity) && valid;
valid = validate_state(form.optState) && valid;
valid = validate_zip(form.txtZip) && valid;
valid = validate_gender(form.radGender) && valid;
valid = validate_courses(form.chkAsp, form.chkJava, form.chkPhp) && valid;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment