birbmap/Birdmap.API/DTOs/RegisterRequest.cs

18 lines
668 B
C#
Raw Normal View History

using System.ComponentModel.DataAnnotations;
namespace Birdmap.API.DTOs
{
2020-11-12 18:13:23 +01:00
public record RegisterRequest
{
[Required(AllowEmptyStrings = false, ErrorMessage = "Username is required.")]
public string Username { get; set; }
[Required(AllowEmptyStrings = false, ErrorMessage = "Password is required."), DataType(DataType.Password)]
public string Password { get; set; }
[Required(AllowEmptyStrings = false, ErrorMessage = "Please confirm password.")]
[DataType(DataType.Password), Compare(nameof(Password), ErrorMessage = "Passwords did not match.")]
public string ConfirmPassword { get; set; }
}
}