Skip to content

Commit 68e418e

Browse files
authored
fix #217 (#266)
1 parent ef615f1 commit 68e418e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Parser/DomainPart.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ protected function doParseDomainPart()
198198

199199
$domain .= $this->lexer->token['value'];
200200
$this->lexer->moveNext();
201+
if ($this->lexer->token['type'] === EmailLexer::S_SP) {
202+
throw new CharNotAllowed();
203+
}
201204
} while (null !== $this->lexer->token['type']);
202205

203206
return $domain;

tests/EmailValidator/Validation/RFCValidationTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ public function getInvalidEmails()
167167
['test@email<'],
168168
['test@email{'],
169169
['test@ '],
170+
170171
];
171172
}
172173

0 commit comments

Comments
 (0)