CodeLiturgy.Dashboard/BlueWest.Api/Users/Models/ResetPasswordViewModel.cs

37 lines
1012 B
C#

using System.ComponentModel.DataAnnotations;
namespace BlueWest.WebApi.Context.Users;
/// <summary>
/// Reset password view model
/// </summary>
public class ResetPasswordViewModel
{
/// <summary>
/// Email address from which the password needs to be reset.
/// </summary>
[Required]
[EmailAddress]
public string Email { get; set; }
/// <summary>
/// Password
/// </summary>
[Required]
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
[DataType(DataType.Password)]
public string Password { get; set; }
/// <summary>
/// Password confirmation
/// </summary>
[DataType(DataType.Password)]
[Display(Name = "Confirm password")]
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
public string ConfirmPassword { get; set; }
/// <summary>
/// The code to reset password.
/// </summary>
public string Code { get; set; }
}