generated from egmont11/ASP.Net-Core-MVC-Template
InitEshop+ddd+ca
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Eshop.Web.ViewModels;
|
||||
|
||||
public class ProfileViewModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "Username")]
|
||||
[StringLength(50, MinimumLength = 3)]
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
[Display(Name = "Email")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Current Password")]
|
||||
public string? CurrentPassword { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "New Password (leave blank to keep current)")]
|
||||
public string? NewPassword { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm New Password")]
|
||||
[Compare("NewPassword")]
|
||||
public string? ConfirmPassword { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user