File size: 615 Bytes
01be06d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System.ComponentModel.DataAnnotations;

namespace TaskTrackingSystem.Shared.Models.Auth
{
    public class ResetPasswordDto
    {
        [Required]
        public string UsernameOrEmail { get; set; } = string.Empty;

        [Required]
        public string RecoveryCode { get; set; } = string.Empty;

        [Required]
        [MinLength(8, ErrorMessage = ResultMessages.PasswordMinLengthRule)]
        [RegularExpression(@"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z0-9]).+$", ErrorMessage = ResultMessages.PasswordComplexityRule)]
        public string NewPassword { get; set; } = string.Empty;
    }
}