1
0
mirror of https://github.com/danog/dns.git synced 2024-11-26 20:14:51 +01:00

Merge pull request #15 from DaveRandom/master

Allow leading digits in name labels
This commit is contained in:
Chris Wright 2014-10-02 16:48:41 +01:00
commit 989a43a787

View File

@ -8,7 +8,7 @@ class NameValidator {
*
* @var string
*/
private $validatePattern = '/^(?:[a-z][a-z0-9\-]{0,61}[a-z0-9])(?:\.[a-z][a-z0-9\-]{0,61}[a-z0-9])*$/i';
private $validatePattern = '/^(?:[a-z0-9][a-z0-9\-]{0,61}[a-z0-9])(?:\.[a-z0-9][a-z0-9\-]{0,61}[a-z0-9])*$/i';
/**
* Check that a name is valid