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)); }