using Core.Abstractions.Models;
using Core.Enumerations;
using System.ComponentModel.DataAnnotations;

namespace WeatherForecast.Models.Account.Requests {
  public class PasswordResetRequestModel : RequestModelBase {

    public string Token { get; set; }
    public string Password { get; set; }
    

    public override IEnumerable<ValidationResult> Validate(ValidationContext validationContext) {
      
      if (string.IsNullOrWhiteSpace(Token))
        yield return new ValidationResult($"{nameof(Token)} ${Errors.NullOrEmpty}");

      if (string.IsNullOrWhiteSpace(Password))
        yield return new ValidationResult($"{nameof(Password)} ${Errors.NullOrEmpty}");
    }
  }
}
