client side validation for entering an integer in the input field