This time we'll make a form that collects information about visitor at your site. You must have filled-in copious registration forms or survey forms where you had to enter your name, your email, your address, etc. Sometimes users, intentionally or unintentionally, enter wrong information that can either spoil your database scheme or give you lots of useless data and hence, waste your precious server space.
To avoid such problems, as much as it can be managed, we programmatically try to make sure, that data is entered in an orderly fashion, and no unusable fields are entered. Checking individual fields of form does this.
We'll see a form here with three fields: Name, Phone and Email. In this form, no field should be left blank, there should be no numbers in Name field [1,2,3,4,.], and in Email field, no email should be without "@" sign. We can carry out more complex validations, but at moment, these three should suffice.
It's very simple. Use any text editor of your liking (if you hand-code your HTML, you can use same editor that you use for your HTML editing). Write required code, and save file with .js (dot js) extension.