From c18889617011b71485c30567cef9d861e035e056 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Thu, 2 Oct 2014 16:41:33 +0100 Subject: [PATCH] Allow leading digits in name labels Update name validator to allow RFC1101 names --- lib/NameValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NameValidator.php b/lib/NameValidator.php index 3a8d764..350c45b 100644 --- a/lib/NameValidator.php +++ b/lib/NameValidator.php @@ -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