From 1180e73ebb45c0c611c20945e5da706f49b141d1 Mon Sep 17 00:00:00 2001 From: SDK Sistemas <76075685+SDKSistemas@users.noreply.github.com> Date: Wed, 2 Feb 2022 17:12:48 -0300 Subject: [PATCH] Update CelularComDdd.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trocando o ddd para [1-9][1-9] pois não existe ddd (00) ou (20), (10) --- src/pt-br-validator/Rules/CelularComDdd.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pt-br-validator/Rules/CelularComDdd.php b/src/pt-br-validator/Rules/CelularComDdd.php index f0abc2e..32b1a1c 100644 --- a/src/pt-br-validator/Rules/CelularComDdd.php +++ b/src/pt-br-validator/Rules/CelularComDdd.php @@ -18,11 +18,11 @@ class CelularComDdd implements Rule */ public function passes($attribute, $value) { - return preg_match('/^\(\d{2}\)\s?\d{4,5}-\d{4}$/', $value) > 0; + return preg_match('/^\([1-9][1-9]\)\s?\d{4,5}-\d{4}$/', $value) > 0; } public function message() { return 'O campo :attribute não é um celular com DDD válido.'; } -} \ No newline at end of file +}