17 lines
404 B
C#
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");
|
|
}
|
|
} |