1
0
mirror of https://github.com/danog/dns.git synced 2025-01-23 05:51:11 +01:00

Allow leading digits in name labels

Update name validator to allow RFC1101 names
This commit is contained in:
Chris Wright 2014-10-02 16:41:33 +01:00
parent d562ce24f4
commit c188896170

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