@codexcentral/is-valid-email
v1.1.0
Published
This package is used to validate an email address.
Downloads
2
Maintainers
Readme
is-valid-email
This package is used to validate an email address.
Installation
npm install @codexcentral/is-valid-email
Usage
1. Importing
import isValidEmail from '@codexcentral/is-valid-email';
2. Call the function
console.log(isValidEmail('[email protected]')); // true
console.log(isValidEmail('[email protected]')); // false
console.log(isValidEmail('[email protected]')); // true
console.log(isValidEmail('[email protected]')); // true
console.log(isValidEmail('kai@[email protected]')); // false
console.log(isValidEmail('[email protected]')); // false
console.log(isValidEmail('[email protected]')); // false
console.log(isValidEmail('[email protected]')); // false
console.log(isValidEmail('kai@[1234].com')); // false
console.log(isValidEmail('test@_domain.com')); // false
console.log(isValidEmail('[email protected]')); // true
console.log(isValidEmail('[email protected]')); // true
console.log(isValidEmail('[email protected]')); // true
console.log(isValidEmail('[email protected]')); // true
Note: Let me know if you have any issues or suggestions.
Response
The function will return a boolean value.
Attributes
| Attribute | Type | Mandatory |
| ------ | ------ | ------ |
| email | string
| true |
Credits
These code was written by Roberto Silva Z.