cpbtechnology/US-Frontend-Candidate-Lab — pull request #29 by damoncasale (2014-07-07 05:32:45+00:00)
Title: Completed front end skill test.

The jquery-validate plugin actually has some minor differences from the open-source version (which I didn't end up using for this project). What I discovered in a recent project was that, if one of my custom validation functions changed the HTML of the form -- or ANYthing did (even jquery-validate itself!) by hiding a previous error message, for instance -- then if a user clicked submit while focused on a field with such a custom validator, the focusout event on the field would be fired, but once the HTML of the form was touched, then the submit event would get eaten and wouldn't fire.

I ended up adding a delay to the jquery-validate plugin to display error messages AFTER the submit event fires.

I didn't spend a lot of time styling the signup form. If I were doing this for a client, I would make the fields rounded, add a bit of spacing between them, make the validation error messages look nicer, etc.

I did, however, add very simple server-side validation to complement the client-side validation.