Validating email format javascript

is an open source component of Wrapp and is licensed under the MIT license.

There are no required external dependencies at all!

validating email format javascript-48

This javascript validation code is cross browser compatible (works for all browsers).

Date Validation Email Validation Phone Number Validation U.

Unless otherwise specified you can always specify the message option to customize the message returned if the validator doesn't pass.

Just remember to not include the attribute name since it's automatically prepended to the error message.

Description: A script that closely examines the content of a form box to ensure that the user entered a valid email address.

If not, the form submition is canceled, and the surfer prompted to re-enter a valid address.

The message can also be a function which will be called to retrieve the message, besides this it is treated like a normal message (the attribute name is prepended etc).

If the message is not a function and not a string it is simply returned as is.

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.

Tags: , ,