Files
eshop/Eshop/Eshop.Web/ViewModels/ProfileViewModel.cs
T
2026-07-16 18:33:05 +02:00

30 lines
809 B
C#

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; }
}