Validating email using javascript

Using the html attributes we have available as well as some hard-working, built-in Java Script functions, we can do simple client-side form validation.

Joshua Studley is a Sr UI Engineer at Kelley Blue Book.

Preventing bad form information is a deadly game of cat and also cat.

As web developers, we want to protect the information filled out in form fields.

The following example shows how you can validate an email address for a form.

If the data entered by a client was incorrect or was simply missing, the server would have to send all the data back to the client and request that the form be resubmitted with correct information.

This was really a lengthy process which used to put a lot of burden on the server.

The goal of is to provide a cross framework and cross language way of validating data.

The validation constraints can be declared in JSON and shared between clients and the server. One thing that is a bit unorthodox is that most validators will consider undefined values (,) valid values.

There is also a Travis project used for testing, a Coveralls project used to code coverage as well as the annotated source.

You must have an account to comment. Please register or login here!