Files
DocumentService/DocumentOperator.Application/Features/Documents/ValidatePdf/ValidatePdfValidator.cs
OlgunR afc0e34312 Complete Step 1.1: ValidatePDF Application Layer
Updated PHASENPLAN and ROADMAP to reflect progress on Feature 1 - ValidatePDF (75% complete). Marked Step 1.1 as completed, including MediatR setup, pipeline behaviors (`ValidationBehavior`, `LoggingBehavior`), ValidatePDF feature (Query, Handler, Validator), and DTOs.

Added `DependencyInjection.cs` for Application Layer DI configuration. Introduced `LoggingBehavior` and `ValidationBehavior` for MediatR pipelines. Implemented `ValidatePdfHandler`, `ValidatePdfQuery`, and `ValidatePdfValidator`.

Created DTOs (`ValidatePdfRequest`, `ValidatePdfResponse`) for the ValidatePDF feature. Added unit tests for `ValidatePdfHandler` to verify metadata handling and exception propagation.

Removed unused folder references in `DocumentOperator.Application.csproj`.
2026-06-25 15:23:58 +02:00

18 lines
495 B
C#

using FluentValidation;
namespace DocumentOperator.Application.Features.Documents.ValidatePdf;
/// <summary>
/// Validator for ValidatePdfQuery
/// Validates that PdfContent is not null (Base64String already validates format in its constructor)
/// </summary>
public class ValidatePdfValidator : AbstractValidator<ValidatePdfQuery>
{
public ValidatePdfValidator()
{
RuleFor(x => x.PdfContent)
.NotNull()
.WithMessage("PDF content is required");
}
}