JavaScript form validation.