This commit is contained in:
Tizian.Breuch
2025-07-29 14:04:35 +02:00
parent 2d6eeb7a50
commit c1ee56c81c
19 changed files with 339 additions and 125 deletions

View File

@@ -0,0 +1,19 @@
// src/Webshop.Application/DTOs/Auth/ChangePasswordRequestDto.cs
using System.ComponentModel.DataAnnotations;
namespace Webshop.Application.DTOs.Auth
{
public class ChangePasswordRequestDto
{
[Required(ErrorMessage = "Altes Passwort ist erforderlich.")]
public string OldPassword { get; set; } = string.Empty;
[Required(ErrorMessage = "Neues Passwort ist erforderlich.")]
[MinLength(6, ErrorMessage = "Passwort muss mindestens 6 Zeichen lang sein.")]
public string NewPassword { get; set; } = string.Empty;
[Required(ErrorMessage = "Passwortbestätigung ist erforderlich.")]
[Compare("NewPassword", ErrorMessage = "Neues Passwort und Bestätigung stimmen nicht überein.")]
public string ConfirmNewPassword { get; set; } = string.Empty;
}
}