Validate Input Text In Javascript Code