Unify and manage your data

Email address validation rules

Learn about the validation rules, accepted formats, and output values that EmailCleanserFn uses when it validates email addresses.

EmailCleanserFn supports commonly used RFC 5321 and RFC 5322 email syntax validation rules. It checks character encoding, email structure, local part formatting, and domain structure.

The following table summarizes the scope of email validation.
ItemValue
Cleanser nameEmailCleanserFn
PurposeValidates email address syntax
Intended usersDeveloper, Reltio Configurator
StandardsRFC 5321, RFC 5322

Email address validation sequence

EmailCleanserFn applies a fixed sequence of checks to each email address. The following table lists the validation checks and shows a valid and invalid example for each one.

StepCheckDescriptionValid exampleInvalid example
1Null valueThe email value is not null.user@example.comnull
2ASCII characters Every character is within the ASCII character set.user@example.comusér@example.com
3Email structureThe email contains one local part and one domain part separated by @.user@example.comuserexample.com
4Leading and trailing whitespaceLeading and trailing whitespace is ignored before validation.user@example.comuser name@example.com
5Trailing dotThe email does not end with a dot.user@example.comuser@example.com.
6Local part validationThe local part follows the defined character and formatting rules.user.name@example.comuser..name@example.com
7Domain validationThe domain follows the symbolic domain format or the bracketed IPv4 format.user@example.comuser@example

Local part rules

The local part is the part before the @ symbol.

The following tables list the character and formatting rules that apply to the local part.
RuleDescriptionValid exampleInvalid example
Letters and numbersLetters and numbers are valid in the local part.user123@example.comuser<123>@example.com
Underscore and hyphenUnderscores and hyphens are valid in the local part.user_name@example.comuser[name]@example.com
ApostropheApostrophes are valid in the local part.user's.name@example.comuser:name@example.com
Plus signPlus signs are valid in the local part.user+tag@example.comuser;tag@example.com
SpacesSpaces are valid only inside quoted strings."user name"@example.comuser name@example.com
At sign inside quotes@ is valid only inside a quoted local part."user@name"@example.comuser@name@example.com
Unsupported special charactersControl characters, parentheses, angle brackets, commas, semicolons, colons, backslashes, and square brackets are invalid in the local part.username@example.comuser<name>@example.com
The following table lists the format rules for the local part.
RuleDescriptionValid exampleInvalid example
Local part is requiredThe email includes a value before @.user@example.com@example.com
Dot-separated segmentsPeriods separate words in the local part.user.name.sub@example.comuser..name@example.com
Leading dotThe local part does not start with a period.user.name@example.com.user@example.com
Trailing dotThe local part does not end with a period.user.name@example.comuser.@example.com
Quoted stringsQuoted strings are valid in the local part."user name"@example.com"user name@example.com

Domain rules

The domain is the portion after the @ symbol.

The following table lists the rules for symbolic domains. A symbolic domain uses a standard domain name such as example.com. Symbolic domain validation is based on the IANA TLD registry.
RuleDescriptionValid exampleInvalid example
Domain is requiredThe email includes a value after @.user@example.comuser@
Domain labelsEach domain label starts and ends with an alphanumeric character.user@sub.example.comuser@-example.com
HyphensHyphens appear only within a domain label.user@my-domain.orguser@example-.org
Top-level domain lengthThe top-level domain contains at least two alphabetic characters.user@example.infouser@example.c
Supported top-level domainThe domain ends with a supported top-level domain.user@example.co.ukuser@example
Domain endingThe domain does not end with a dot.user@example.comuser@example.com.
The validator supports standard domain formats and local domain formats. The following table lists the top-level domain categories used during domain validation.
CategoryExample
Generic.com, .org, .net, .info, .biz, .edu, .gov, .mil
Country code.uk, .de
Infrastructure.arpa, .root
Local domains, when local domain validation is enabledlocalhost, localdomain
Custom allowed top-level domainsTenant-specific allowed values

Domain type classification

After the email address passes the null, ASCII, structure, local part, and domain checks, the EmailCleanserFn classifies the domain as PUBLIC or PRIVATE based on an internal list of commonly used public email providers. The following table describes the domain classifications.

DomainTypeDescriptionExample
PUBLICThe domain is in the public domains list.gmail.com
PRIVATEThe domain is not in the public domains list.company.example

Unsupported validation scenarios

EmailCleanserFn validates email syntax and domain formatting only. It does not verify mailbox availability, mail server configuration, or message deliverability.

The following table lists unsupported validation scenarios.

Validation typeDescription
Mailbox verificationDoes not verify whether the mailbox exists
SMTP connectivityDoes not validate SMTP server connectivity
MX record validationDoes not check DNS MX records
Verification email deliveryDoes not send verification or confirmation emails
Disposable email detectionDoes not detect temporary or disposable email providers
Deliverability validationDoes not guarantee that an email can receive messages

Output values

After the email address is validated, the validator returns the original email value, the validation result, and, for a valid email address, the parsed email parts and the domain classification. The following table lists the output values along with their examples.

Output valueDescriptionExample
Original email addressReturns the input email address.user@example.com
Validation statusReturns VALID or INVALID.VALID
UsernameReturns the local part before @ when the email is valid.user
DomainReturns the domain part after @ when the email is valid.example.com
Email typeReturns PUBLIC or PRIVATE.PUBLIC

Email examples

The following table shows sample email addresses and their validation results.

Email addressResultDescription
user@example.comValidStandard email format
user.name@example.comValidDot-separated local part
user+tag@example.co.ukValidPlus sign in the local part
"user name"@example.comValidQuoted local part with a space
user@[10.x.x.x]ValidBracketed IPv4 domain
user_name@sub.example.orgValidUnderscore in the local part and subdomain in the domain
user@exampleInvalidMissing top-level domain
user@example.InvalidTrailing dot
user name@example.comInvalidUnquoted space in the local part
user@example..comInvalidConsecutive dots in the domain
user@256.1.1.1InvalidInvalid IP address as it is not within the octet range
user@InvalidMissing domain
@example.comInvalidMissing local part