PIbd-23. Sergunov M.A. LabWork07 base #7
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user