22 lines
864 B
C#
22 lines
864 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Webshop.Application.DTOs.Auth
|
|
{
|
|
public class RegisterRequestDto
|
|
{
|
|
[Required(ErrorMessage = "E-Mail ist erforderlich.")]
|
|
[EmailAddress(ErrorMessage = "Ungültiges E-Mail-Format.")]
|
|
public string Email { get; set; } = string.Empty;
|
|
|
|
[Required(ErrorMessage = "Passwort ist erforderlich.")]
|
|
[MinLength(6, ErrorMessage = "Passwort muss mindestens 6 Zeichen lang sein.")]
|
|
public string Password { get; set; } = string.Empty;
|
|
|
|
[Required(ErrorMessage = "Passwortbestätigung ist erforderlich.")]
|
|
[Compare("Password", ErrorMessage = "Passwörter stimmen nicht überein.")]
|
|
public string ConfirmPassword { get; set; } = string.Empty;
|
|
|
|
public string? FirstName { get; set; }
|
|
public string? LastName { get; set; }
|
|
}
|
|
} |