Added client-side validation to form.