diff --git a/GiftShop/GiftShopBusinessLogic/BusinessLogics/ClientLogic.cs b/GiftShop/GiftShopBusinessLogic/BusinessLogics/ClientLogic.cs index d50860c..ce33113 100644 --- a/GiftShop/GiftShopBusinessLogic/BusinessLogics/ClientLogic.cs +++ b/GiftShop/GiftShopBusinessLogic/BusinessLogics/ClientLogic.cs @@ -106,7 +106,7 @@ namespace GiftShopBusinessLogic.BusinessLogics { throw new ArgumentException("Неправильно введенный email", nameof(model.Email)); } - if (model.Password.Length < 10 || model.Password.Length > 50) + 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]*$") || model.Password.Length < 10 || model.Password.Length > 50) { throw new ArgumentException("Неправильно введенный пароль", nameof(model.Password)); }