Added validation to setup dto

This commit was merged in pull request #9.
This commit is contained in:
2026-02-09 07:47:38 +01:00
parent 1f631be1c7
commit 8d9a7bb8b3

View File

@@ -1,8 +1,20 @@
namespace Moonlight.Shared.Http.Requests.Seup;
using System.ComponentModel.DataAnnotations;
namespace Moonlight.Shared.Http.Requests.Seup;
public class ApplySetupDto
{
[Required]
[MinLength(3)]
[MaxLength(32)]
public string AdminUsername { get; set; }
[Required]
[EmailAddress]
public string AdminEmail { get; set; }
[Required]
[MinLength(8)]
[MaxLength(64)]
public string AdminPassword { get; set; }
}