Improve client side form validation