multiple input validation javaScript (finished)