Skip to content

digigarlab/salesforce-email

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

salesforce-email

This package provides a validation function that check that the given email address is compatible with Salesforce. It follows the salesforce format for the local-part and Mozilla regex for the domain-part of the email.

Like Salesforce, it does not respect the RFC 6532 and will reject emails with accents and other special characters.

Unlike Salesforce, it does not accept comments; for example john.doe@(comment)example.com, and john.doe@example.com(comment) are allowed by salesforce but rejected by this module.

Installation

With npm:

npm i salesforce-email

Or with yarn

yarn install salesforce-email

Usage

import { isValidEmail } from 'salesforce-email'

console.log(isValidEmail('foo@bar.com')) // true

About

Check that email respect the Salesforce format.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%