https://github.com/umakantp/is_email.js
is_email for JavaScript
https://github.com/umakantp/is_email.js
Last synced: 3 months ago
JSON representation
is_email for JavaScript
- Host: GitHub
- URL: https://github.com/umakantp/is_email.js
- Owner: umakantp
- License: bsd-2-clause
- Created: 2013-08-04T12:07:28.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-09-11T19:22:28.000Z (over 11 years ago)
- Last Synced: 2025-02-09T12:17:26.802Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 195 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
is_email.js
===========_is_email.js is a port of the is_email PHP library to Javascript._
is_email validates email address for you using simple javascript function is_email. Validate an email address according to RFCs 5321, 5322 and others.
**Note:- It doesn't not support DNS check for MX records and parsed address components like the PHP is_email does.**
### How to use ?
1. Include is_email.js in your page.
``` html```
2. And start validating emails.
``` js
var check = is_email("[email protected]");
if (check) {
alert("You have entered correct email address.");
} else {
alert("Please provide correct email address.");
}
```### How to use in Node.js ?
``` js
e = require('./is_email.js');
var check = e.is_email("[email protected]");
if (check) {
console.log("You have entered correct email address.");
} else {
console.log("Please provide correct email address.");
}
```### How to use with Require.js ?
``` js
require(['is_email'], function (is_email) {
var check = is_email("[email protected]");
if (check) {
alert("You have entered correct email address.");
} else {
alert("Please provide correct email address.");
}
});
```### How to use with jQuery.js ?
``` js
var check = $.is_email("[email protected]");
if (check) {
alert("You have entered correct email address.");
} else {
alert("Please provide correct email address.");
}
```### Wanna Donate?
Go to [http://isemail.info](http://isemail.info) and click on donate button at the top-right.