Beautiful Registration form

This is a simple registration form with validation; designed using CSS, HTML, and JavaScript. The input type ‘text' has been used for the text fields. The ‘span' element has been used with the class name "login-error" to display the error message. The display style of this class is set as none and the font size as 16px. By setting the display value as none, the error message will not be visible until the input is entered. The key up function in JavaScript makes sure the validation happens with every single character entered. A switch case is used in JavaScript to determine the type of error: a "value missing" error if the value is null or empty, "at least 3 chars for value" if the entered value is less than or equal to 2 characters and a "no more than 50 chars for value" if the entered value is greater than or equal to 50 characters. Source :

Post Comment or Questions

Lorem ut labore et dolore magna aliqua. Ut enim ad minim veniam.

Your email address will not be published. Required fields are marked *