one input validation javaScript