using System.ComponentModel.DataAnnotations;

namespace MemberCenter.Web.Models.Account;

public sealed class RegisterViewModel
{
    [Display(Name = "Email")]
    [Required(ErrorMessage = "The {0} field is required.")]
    [EmailAddress(ErrorMessage = "The {0} field is not a valid e-mail address.")]
    public string Email { get; set; } = string.Empty;

    [Display(Name = "Password")]
    [Required(ErrorMessage = "The {0} field is required.")]
    [DataType(DataType.Password)]
    public string Password { get; set; } = string.Empty;

    [Display(Name = "ConfirmPassword")]
    [Required(ErrorMessage = "The {0} field is required.")]
    [Compare(nameof(Password), ErrorMessage = "The {0} and {1} fields do not match.")]
    [DataType(DataType.Password)]
    public string ConfirmPassword { get; set; } = string.Empty;

    [Range(typeof(bool), "true", "true", ErrorMessage = "You must accept the terms before registering.")]
    public bool AcceptTerms { get; set; }
}
