fixed the client side form validation