mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-09-01 13:08:58 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 01002fa052 | |||
| 8edbe450f1 | |||
| c14d12ee17 | |||
| 9320624d03 | |||
| ab22322b82 | |||
| 44d20e3440 | |||
| c5d6b8c16a | |||
| b03e9c935f | |||
| 8fb7a88965 | |||
| 06579b96ca | |||
| b79cd8f033 | |||
| 07464f87c8 | |||
| b80f568f75 | |||
| 03a062e9e4 | |||
| 1cb5b2a402 |
@@ -280,9 +280,9 @@ class DomainPart extends PartParser
|
||||
{
|
||||
if ($this->lexer->token['type'] === EmailLexer::S_DOT || $isEndOfDomain) {
|
||||
if ($this->isLabelTooLong($this->label)) {
|
||||
$this->label = '';
|
||||
return new InvalidEmail(new LabelTooLong(), $this->lexer->token['value']);
|
||||
}
|
||||
$this->label = '';
|
||||
}
|
||||
$this->label .= $this->lexer->token['value'];
|
||||
return new ValidEmail();
|
||||
|
||||
@@ -21,7 +21,7 @@ interface EmailValidation
|
||||
/**
|
||||
* Returns the validation error.
|
||||
*
|
||||
* @return InvalidEmail|null
|
||||
* @return InvalidEmail
|
||||
*/
|
||||
public function getError() : ?InvalidEmail;
|
||||
|
||||
|
||||
@@ -76,7 +76,6 @@ class RFCValidationDomainPartTest extends TestCase
|
||||
['validipv4@[127.0.0.0]'],
|
||||
['validipv4@127.0.0.0'],
|
||||
['withhyphen@domain-exam.com'],
|
||||
['valid_long_domain@71846jnrsoj91yfhc18rkbrf90ue3onl8y46js38kae8inz0t1.5a-xdycuau.na49.le.example.com']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user