結果 : how to validate string input in javascript