apply form validation.