From 504801520b706e1ce65637311b50116e7f4b9fb7 Mon Sep 17 00:00:00 2001 From: Vladimir Barinov Date: Fri, 17 Jan 2025 15:20:43 +0300 Subject: [PATCH] chore(user): increase first and last name limit to 64 --- Web/Models/Entities/User.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Web/Models/Entities/User.php b/Web/Models/Entities/User.php index a1f650ec..0356e6ce 100644 --- a/Web/Models/Entities/User.php +++ b/Web/Models/Entities/User.php @@ -1058,7 +1058,7 @@ class User extends RowModel function setFirst_Name(string $firstName): void { $firstName = mb_convert_case($firstName, MB_CASE_TITLE); - if(!preg_match('%^[\p{Lu}\p{Lo}]\p{Mn}?(?:[\p{L&}\p{Lo}]\p{Mn}?){1,16}$%u', $firstName)) + if(!preg_match('%^[\p{Lu}\p{Lo}]\p{Mn}?(?:[\p{L&}\p{Lo}]\p{Mn}?){1,64}$%u', $firstName)) throw new InvalidUserNameException; $this->stateChanges("first_name", $firstName); @@ -1069,7 +1069,7 @@ class User extends RowModel if(!empty($lastName)) { $lastName = mb_convert_case($lastName, MB_CASE_TITLE); - if(!preg_match('%^[\p{Lu}\p{Lo}]\p{Mn}?([\p{L&}\p{Lo}]\p{Mn}?){1,16}(\-\g<1>+)?$%u', $lastName)) + if(!preg_match('%^[\p{Lu}\p{Lo}]\p{Mn}?([\p{L&}\p{Lo}]\p{Mn}?){1,64}(\-\g<1>+)?$%u', $lastName)) throw new InvalidUserNameException; }