mirror of
https://github.com/Sea-Haven-Industries/proposal-system.git
synced 2026-10-05 06:02:03 +00:00
19 lines
542 B
C#
19 lines
542 B
C#
|
|
using FluentValidation;
|
||
|
|
using ProposalSystem.Application.DTOs;
|
||
|
|
|
||
|
|
namespace ProposalSystem.Application.Validators;
|
||
|
|
|
||
|
|
// Fix: API-M5 — add FluentValidation for GeneratedPdf DTO
|
||
|
|
public class CreateGeneratedPdfValidator : AbstractValidator<CreateGeneratedPdfRequest>
|
||
|
|
{
|
||
|
|
public CreateGeneratedPdfValidator()
|
||
|
|
{
|
||
|
|
RuleFor(x => x.ProposalId)
|
||
|
|
.NotEmpty().WithMessage("Proposal ID is required");
|
||
|
|
|
||
|
|
RuleFor(x => x.S3Key)
|
||
|
|
.NotEmpty().WithMessage("S3 key is required")
|
||
|
|
.MaximumLength(1000);
|
||
|
|
}
|
||
|
|
}
|