Files
Knots/Knots/Validators/Group/DeleteGroupDtoValidator.cs
T
2026-03-19 16:44:48 +01:00

17 lines
404 B
C#

using FastEndpoints;
using FluentValidation;
using Knots.DTO.Group;
namespace Knots.Validators.Group;
public class DeleteGroupDtoValidator : Validator<DeleteGroupDto>
{
public DeleteGroupDtoValidator()
{
RuleFor(x => x.Id)
.NotEmpty()
.WithMessage("Id is required")
.GreaterThan(0)
.WithMessage("Id cannot be less than zero");
}
}