javascript lib to validate input