validate input in nodejs