diff --git a/src/ReC.Application/Common/Validations/DeleteObjectProcedureValidator.cs b/src/ReC.Application/Common/Validations/DeleteObjectProcedureValidator.cs new file mode 100644 index 0000000..9e0aedb --- /dev/null +++ b/src/ReC.Application/Common/Validations/DeleteObjectProcedureValidator.cs @@ -0,0 +1,18 @@ +using FluentValidation; +using ReC.Application.Common.Procedures.DeleteProcedure; + +namespace ReC.Application.Common.Validations; + +public class DeleteObjectProcedureValidator : AbstractValidator +{ + public DeleteObjectProcedureValidator() + { + RuleFor(x => x.Start) + .GreaterThan(0) + .WithMessage("Start GUID/ID must be greater than 0."); + + RuleFor(x => x.End) + .GreaterThanOrEqualTo(x => x.Start) + .WithMessage("End GUID/ID must be greater than or equal to Start GUID/ID."); + } +}