mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-08-18 22:50:30 +00:00
complaying to RFC1035 about domain names
This commit is contained in:
@@ -36,6 +36,12 @@ class EmailLexer extends AbstractLexer
|
||||
const S_EMPTY = null;
|
||||
const GENERIC = 300;
|
||||
const CRLF = 301;
|
||||
const ASTERISK = 42;
|
||||
const EXCLAMATION = 33;
|
||||
const AMPERSAND = 38;
|
||||
const CARET = 94;
|
||||
const PERCENTAGE = 37;
|
||||
const DOLLAR = 36;
|
||||
const INVALID = 302;
|
||||
const ASCII_INVALID_FROM = 127;
|
||||
const ASCII_INVALID_TO = 199;
|
||||
@@ -73,6 +79,12 @@ class EmailLexer extends AbstractLexer
|
||||
'}' => self::S_CLOSEQBRACKET,
|
||||
'' => self::S_EMPTY,
|
||||
'\0' => self::C_NUL,
|
||||
'*' => self::ASTERISK,
|
||||
'!' => self::EXCLAMATION,
|
||||
'&' => self::AMPERSAND,
|
||||
'^' => self::CARET,
|
||||
'$' => self::DOLLAR,
|
||||
'%' => self::PERCENTAGE,
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -70,12 +70,6 @@ class RFCValidationDomainPartTest extends TestCase
|
||||
['example@faked(fake).co.uk'],
|
||||
['инфо@письмо.рф'],
|
||||
['müller@möller.de'],
|
||||
['test@email*'],
|
||||
['test@email!'],
|
||||
['test@email&'],
|
||||
['test@email^'],
|
||||
['test@email%'],
|
||||
['test@email$'],
|
||||
["1500111@профи-инвест.рф"],
|
||||
['validipv6@[IPv6:2001:db8:1ff::a0b:dbd0]'],
|
||||
['validipv4@[127.0.0.0]'],
|
||||
@@ -132,6 +126,12 @@ class RFCValidationDomainPartTest extends TestCase
|
||||
['example@toolonglocalparttoolonglocalparttoolonglocalparttoolonglocalpart.co.uk'],
|
||||
['example@toolonglocalparttoolonglocalparttoolonglocalparttoolonglocalpart.test.co.uk'],
|
||||
['example@test.toolonglocalparttoolonglocalparttoolonglocalparttoolonglocalpart.co.uk'],
|
||||
['test@email*'],
|
||||
['test@email!'],
|
||||
['test@email&'],
|
||||
['test@email^'],
|
||||
['test@email%'],
|
||||
['test@email$'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user