improved client side form validation handling