Skip to content

Commit

Permalink
fix #217 (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
egulias committed Sep 26, 2020
1 parent ef615f1 commit 68e418e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Parser/DomainPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ protected function doParseDomainPart()

$domain .= $this->lexer->token['value'];
$this->lexer->moveNext();
if ($this->lexer->token['type'] === EmailLexer::S_SP) {
throw new CharNotAllowed();
}
} while (null !== $this->lexer->token['type']);

return $domain;
Expand Down
1 change: 1 addition & 0 deletions tests/EmailValidator/Validation/RFCValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public function getInvalidEmails()
['test@email<'],
['test@email{'],
['test@ '],
['test@example.com []'],
];
}

Expand Down

0 comments on commit 68e418e

Please sign in to comment.