using BookHive.DTO.Author; using FastEndpoints; using FluentValidation; namespace BookHive.Validators.Authors; public class GetAuthorDtoValidator : Validator { public GetAuthorDtoValidator() { RuleFor(x => x.Id) .GreaterThan(0) .WithMessage("Id is invalid"); RuleFor(x => x.FirstName) .NotEmpty() .WithMessage("First name is required"); RuleFor(x => x.LastName) .NotEmpty() .WithMessage("Last name is required"); } }