enforce form validation on pressing enter on the input fields