21 lines
532 B
C#
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");
|
|
}
|
|
} |