Added rudimentary client-side form validation.