using System.ComponentModel.DataAnnotations; namespace FirmTracker_Server.Models { public class UserDto { [Required] [MaxLength(16)] public string Login { get; set; } [Required] [EmailAddress] public string Email { get; set; } [Required] [MinLength(8, ErrorMessage = "Password must be at least 8 characters long.")] [MaxLength(100, ErrorMessage = "Password cannot be longer than 100 characters.")] [RegularExpression(@"^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[@$!%*?&#])[A-Za-z\d@$!%*?&#]{8,}$", ErrorMessage = "Password must contain at least one uppercase letter, one lowercase letter, one digit, and one special character.")] public string Password { get; set; } } }