mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-09-14 03:56:48 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 68e418ec08 | |||
| ef615f1d74 |
@@ -5,7 +5,7 @@
|
|||||||
[](https://scrutinizer-ci.com/g/egulias/EmailValidator/?branch=master)
|
[](https://scrutinizer-ci.com/g/egulias/EmailValidator/?branch=master)
|
||||||
[](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6)
|
[](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6)
|
||||||
|
|
||||||
## Suported RFCs ##
|
## Supported RFCs ##
|
||||||
|
|
||||||
This library aims to support:
|
This library aims to support:
|
||||||
|
|
||||||
|
|||||||
@@ -198,6 +198,9 @@ class DomainPart extends Parser
|
|||||||
|
|
||||||
$domain .= $this->lexer->token['value'];
|
$domain .= $this->lexer->token['value'];
|
||||||
$this->lexer->moveNext();
|
$this->lexer->moveNext();
|
||||||
|
if ($this->lexer->token['type'] === EmailLexer::S_SP) {
|
||||||
|
throw new CharNotAllowed();
|
||||||
|
}
|
||||||
} while (null !== $this->lexer->token['type']);
|
} while (null !== $this->lexer->token['type']);
|
||||||
|
|
||||||
return $domain;
|
return $domain;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class DNSCheckValidationTest extends TestCase
|
|||||||
['"Fred\ Bloggs"@ietf.org'],
|
['"Fred\ Bloggs"@ietf.org'],
|
||||||
['"Joe.\\Blow"@ietf.org'],
|
['"Joe.\\Blow"@ietf.org'],
|
||||||
|
|
||||||
// unicide
|
// unicode
|
||||||
['ñandu.cl'],
|
['ñandu.cl'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -106,4 +106,4 @@ class DNSCheckValidationTest extends TestCase
|
|||||||
$validation->isValid("example@invalid.example.com", new EmailLexer());
|
$validation->isValid("example@invalid.example.com", new EmailLexer());
|
||||||
$this->assertEquals($expectedError, $validation->getError());
|
$this->assertEquals($expectedError, $validation->getError());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ class RFCValidationTest extends TestCase
|
|||||||
['test@email<'],
|
['test@email<'],
|
||||||
['test@email{'],
|
['test@email{'],
|
||||||
['test@ '],
|
['test@ '],
|
||||||
|
['test@example.com []'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user