Allow only AlphaNumeric, Dot, Underscore in Username using JavaScript
Introduction: Hello Guys, “ Welcome back” Today i am here with another one new great article. In this article I will explain about the implementation how to allow only AlphaNumeric, Dot (Period) and Underscore characters in Username using JavaScript. When the Submit Button will be clicked by the user, the Username in the TextBox will be validate using JavaScript and Regular Expression (Regex) and if the Username is invalid, the error message will be displayed next to the TextBox using JavaScript. Code for HTML Page On the HTML page there i will place Textbox control with the id named text_uname for entering the text (Alphabet, Numeric, Underscore, Dot) by the user. Here I will also place the control named span with the id named label_error to show the message or error message. Here I will also place the control named button with the id named btn_validate. When user will click on the submit button after entering the text in the texbox then a function named validate_uname ...