Files
BeReadyBackend/BeReadyBackend/Validators/Users/GetUserProofDtoValidator.cs
T
2026-03-24 18:02:10 +01:00

21 lines
532 B
C#

using BeReadyBackend.DTO.Users;
using FastEndpoints;
using FluentValidation;
namespace BeReadyBackend.Validators.Users;
public class GetUserProofDtoValidator : Validator<GetUserProofDto>
{
public GetUserProofDtoValidator()
{
RuleFor(x => x.Id)
.NotEmpty()
.WithMessage("Id cannot be empty")
.GreaterThan(0)
.WithMessage("Id must be greater than 0");
RuleFor(x => x.Proof)
.NotEmpty()
.WithMessage("Proof cannot be empty");
}
}