|
- using System.ComponentModel.DataAnnotations;
-
- namespace CartWise.Web.ViewModels.Account;
-
- public class RegisterViewModel
- {
- [Required]
- [Display(Name = "Display name")]
- [StringLength(100, MinimumLength = 1)]
- public string DisplayName { get; set; } = string.Empty;
-
- [Required]
- [EmailAddress]
- public string Email { get; set; } = string.Empty;
-
- [Required]
- [StringLength(100, MinimumLength = 8)]
- [DataType(DataType.Password)]
- public string Password { get; set; } = string.Empty;
-
- [Required]
- [DataType(DataType.Password)]
- [Display(Name = "Confirm password")]
- [Compare(nameof(Password), ErrorMessage = "The password and confirmation password do not match.")]
- public string ConfirmPassword { get; set; } = string.Empty;
-
- public string? ReturnUrl { get; set; }
- }
|