Enable data annotations. Everything works

This commit is contained in:
2026-01-26 21:56:45 +01:00
parent 6c77fabe47
commit da6d192254

View File

@@ -1,10 +1,12 @@
namespace Sandbox.Models.ViewModels;
using System.ComponentModel.DataAnnotations;
namespace Sandbox.Models.ViewModels;
public class UserRegister
{
public string Email { get; set; } = string.Empty;
//[Required, StringLength(100, MinimumLength = 5)]
[Required, StringLength(100, MinimumLength = 5)]
public string Password { get; set; } = string.Empty;
//[Compare("Password", ErrorMessage = "The password do not match.")]
[Compare("Password", ErrorMessage = "The password do not match.")]
public string ConfirmPassword { get; set; } = string.Empty;
}