try
This commit is contained in:
19
Webshop.Application/DTOs/Auth/ChangePasswordRequestDto.cs
Normal file
19
Webshop.Application/DTOs/Auth/ChangePasswordRequestDto.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user