服务器部署测试~~~

This commit is contained in:
heiye111
2025-10-10 16:02:38 +08:00
parent 8ab52738c0
commit 5c186aa446
87 changed files with 5062 additions and 167 deletions

View File

@@ -0,0 +1,18 @@
using FluentValidation;
using SimpleTodoApiWithPg.Models;
public class RegisterRequestValidator : AbstractValidator<RegisterRequest>
{
public RegisterRequestValidator()
{
RuleFor(x => x.Username)
.NotEmpty().WithMessage("用户名是必填的。")
.Length(3, 20).WithMessage("用户名长度必须在 {MinLength} 到 {MaxLength} 之间。");
RuleFor(x => x.Email)
.NotEmpty().WithMessage("邮箱是必填的。")
.EmailAddress().WithMessage("请输入有效的邮箱地址。");
}
}