From 827cd9fac2c59ffea946fbd0e56b8daa9dded4f9 Mon Sep 17 00:00:00 2001 From: Salikh Date: Sat, 25 May 2024 12:05:45 +0400 Subject: [PATCH] commit 5 --- MotorPlant/MotorPlantBusinessLogic/BusinessLogic/ClientLogic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MotorPlant/MotorPlantBusinessLogic/BusinessLogic/ClientLogic.cs b/MotorPlant/MotorPlantBusinessLogic/BusinessLogic/ClientLogic.cs index 6f7f230..c2b5895 100644 --- a/MotorPlant/MotorPlantBusinessLogic/BusinessLogic/ClientLogic.cs +++ b/MotorPlant/MotorPlantBusinessLogic/BusinessLogic/ClientLogic.cs @@ -97,7 +97,7 @@ namespace MotorPlantBusinessLogic.BusinessLogics { throw new ArgumentNullException("Не указана валидная почта", nameof(model.Email)); } - if (string.IsNullOrEmpty(model.Password)) + if (string.IsNullOrEmpty(model.Password) || !Regex.IsMatch(model.Password, @"^(?=.*[A-Za-z])(?=.*\d)(?=.*[^A-Za-z0-9\n]).{10,50}$")) { throw new ArgumentNullException("Не указан правильный пароль", nameof(model.Password)); }