Auth Tests

This commit is contained in:
Artemy
2025-06-19 09:51:55 +07:00
parent 7d518c0882
commit d18ad19f80
4 changed files with 91 additions and 3 deletions
+14 -1
View File
@@ -1,3 +1,16 @@
using System.ComponentModel.DataAnnotations;
using Govor.Core.Infrastructure.Validators;
namespace Govor.Core.DTOs;
public record UserDto(string Password, string Name);
public record UserDto
{
[Required]
[StringLength(UserValidator.MAX_LENGHT_OF_NAME,
MinimumLength = UserValidator.MIN_LENGHT_OF_NAME,
ErrorMessage = "Username must be between 4 and 50 characters.")]
public string Name { get; init; }
[Required]
[MinLength(8)]
public string Password { get; init; }
}