2020-10-25 16:15:06 +01:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace Birdmap.API.DTOs
|
|
|
|
|
{
|
2020-11-12 18:13:23 +01:00
|
|
|
|
public record RegisterRequest
|
2020-10-25 16:15:06 +01:00
|
|
|
|
{
|
|
|
|
|
[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; }
|
|
|
|
|
}
|
|
|
|
|
}
|