Updated Solution to Javascript Form Validation Exercise