From be41de91c5dc73b93a1d2b965e381b0a80e523da Mon Sep 17 00:00:00 2001 From: dasha Date: Fri, 28 Apr 2023 19:42:36 +0400 Subject: [PATCH] =?UTF-8?q?=D1=82=D1=83=D1=82=20=D1=82=D0=BE=D0=B6=D0=B5?= =?UTF-8?q?=20=D0=BD=D0=B0=D0=B4=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SushiBar/SushiBarBusinessLogic/BusinessLogics/ClientLogic.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SushiBar/SushiBarBusinessLogic/BusinessLogics/ClientLogic.cs b/SushiBar/SushiBarBusinessLogic/BusinessLogics/ClientLogic.cs index dc5e71f..566a22d 100644 --- a/SushiBar/SushiBarBusinessLogic/BusinessLogics/ClientLogic.cs +++ b/SushiBar/SushiBarBusinessLogic/BusinessLogics/ClientLogic.cs @@ -110,7 +110,8 @@ namespace SushiBarBusinessLogic.BusinessLogics { throw new ArgumentException("Неправильно введенный email", nameof(model.Email)); } - if (!Regex.IsMatch(model.Password, @"^^((\w+\d+\W+)|(\w+\W+\d+)|(\d+\w+\W+)|(\d+\W+\w+)|(\W+\w+\d+)|(\W+\d+\w+))[\w\d\W]*$", RegexOptions.IgnoreCase)) + if (!Regex.IsMatch(model.Password, @"^^((\w+\d+\W+)|(\w+\W+\d+)|(\d+\w+\W+)|(\d+\W+\w+)|(\W+\w+\d+)|(\W+\d+\w+))[\w\d\W]*$", RegexOptions.IgnoreCase) + || model.Password.Length < 10 || model.Password.Length > 50) { throw new ArgumentException("Неправильно введенный пароль", nameof(model.Password)); }