birbmap/Birdmap.API/DTOs/RegisterRequest.cs
2020-10-25 16:56:44 +01:00

18 lines
667 B
C#

using System.ComponentModel.DataAnnotations;
namespace Birdmap.API.DTOs
{
public class 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; }
}
}