smth has changed

This commit is contained in:
Максим Сергунов 2023-06-03 23:06:31 +04:00
parent 7d10014956
commit deb2fb84fd

View File

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