PIbd-23. Sergunov M.A. LabWork07 base #7

Closed
Maksim-S wants to merge 4 commits from LabWork07_base into LabWork06_base
Showing only changes of commit 2c43bea1b1 - Show all commits

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