/* * This file is part of FirmTracker - Server. * * FirmTracker - Server is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * FirmTracker - Server is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with FirmTracker - Server. If not, see . */ 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; } } }