This commit is contained in:
Salikh 2024-05-25 11:32:43 +04:00
parent e02005cbf8
commit 06424fb0d5
4 changed files with 12 additions and 6 deletions

5
.gitignore vendored
View File

@ -14,6 +14,11 @@
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# dll файлы
*.dll
/MotorPlant/ImplementationExtensions
# Mono auto generated files
mono_crash.*

View File

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

View File

@ -8,6 +8,7 @@ namespace MotorPlantDatabaseImplement.Models
{
public class MessageInfo : IMessageInfoModel
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public string MessageId { get; set; } = string.Empty;