CodeLiturgy.Dashboard/BlueWest.Api/Session/ResetPasswordViewModel.cs

37 lines
1012 B
C#
Raw Normal View History

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