﻿using Microsoft.AspNetCore.Mvc;

namespace ASPNETCoreIdentitySample.ViewModels.Identity;

public class ResetPasswordViewModel
{
    [Required(ErrorMessage = "(*)")]
    [EmailAddress(ErrorMessage = "لطفا آدرس ایمیل معتبری را وارد نمائید.")]
    [Display(Name = "ایمیل")]
    public string Email { get; set; }

    [Required(ErrorMessage = "(*)")]
    [StringLength(100, ErrorMessage = "{0} باید حداقل {2} و حداکثر {1} حرف باشند.", MinimumLength = 6)]
    [Remote("ValidatePassword", "ForgotPassword",
        AdditionalFields = nameof(Email) + "," + ViewModelConstants.AntiForgeryToken, HttpMethod = "POST")]
    [DataType(DataType.Password)]
    [Display(Name = "کلمه‌ی عبور")]
    public string Password { get; set; }

    [Required(ErrorMessage = "(*)")]
    [DataType(DataType.Password)]
    [Display(Name = "تکرار کلمه‌ی عبور")]
    [Compare(nameof(Password), ErrorMessage = "کلمات عبور وارد شده با هم تطابق ندارند")]
    public string ConfirmPassword { get; set; }

    public string Code { get; set; }
}