css forms

FormBuilder
stunning form maker

FormBuilder is a free desktop app that helps you easily create bootstrap form, jquery ajax form, web form, css form and more in a few seconds without writing a single line of code. Create wonderful online forms in just a few clicks.

Awesome tool to create beautiful forms with JavaScript form validation

JavaScript is a dynamic programming computer language which provides a convenient way to validate forms before sending it to the web server.

Javascript form validation will save a lot of time up front, but if the user has turned off JavaScript double-checking the data on the server remains necessary. The two main functions of the form validation include:

Basic Validation: To make sure data is entered into each form field that required it.

Data Format Validation: To check that data entered is correct or not. It checks the correct form and value.

javascript form validation

JavaScript Validations are of following types:

• Required fields

• Valid user name

• Valid password

• Valid e-mail address

• Valid phone number

1. Required Fields:

It is a basic JavaScript validation in which the function checks if a field has been left empty. The JavaScript form will be not be submitted if the field is blank, an alert box will alert a message.

2. Valid User Name:

It is data format validation in which the function checks

• If the username field contains anything at all entered by the user.

• If the username field is not blank, the function checks the length of the string and permit only usernames that is between 5 and 15 characters.

• Then, we use the JavaScript regular expression /\W/ to forbid illegal characters from appearing in usernames. It allows only letters, numbers and underscores.

3. Valid Password:

It is another important JavaScript validation in which the function checks the password field for blankness and allows only letters and numbers but no underscores. Therefore a new regular expression is used to forbid underscores.

* This one /[\W_]/ allow only letters and numbers.

* seacrh() method and two more regular expressions: /(a-z)+/ and /(0-9)/ allows only passwords that contain letters and at least one numeral.

4. Valid e-mail address:

The JavaScript form also has the above JavaScript validation which is used to check the email address entered by user is real or not.

* The data entered for email address must contain at least an @ sign and a dot (.) for which the @ must not be the first character of the email address, and the last dot must at least be one character after the @ sign.

* At first we check if the user entered anything at all in the email field. Next, we use regular expression and the test() method to check the field for a compliance. Also we will use trim() function that will trim leading whitespace off the string. This won’t be perfect validation — it is possible to slip not compliant addresses by it — but it's normally good enough.

5. Valid Phone Number:

As the name suggests this JavaScript validation checks if the phone number entered in the JavaScript form is valid.

* Firstly we use regular expression and the replace () method to clear out any spacer characters.

* Then the isNaN() function is used to check if the phone number contain only numbers.

* And finally the function checks the length of the string and allows only phone numbers with 10 digits.

Formoid is an awesome tool to create beautiful forms with JavaScript form validation .It is an ultimate platform that will provide superior validated form. Formoid provides incredible forms as per requirement. It is simple, powerful and user-friendly tool to meet any requirement of nice forms.