14 lines
377 B
C#
14 lines
377 B
C#
using FluentValidation;
|
|
using Indotalent.Shared.Consts;
|
|
|
|
namespace Indotalent.Features.Utilities.Todo.Cqrs;
|
|
|
|
public class CreateTodoValidator : AbstractValidator<CreateTodoRequest>
|
|
{
|
|
public CreateTodoValidator()
|
|
{
|
|
RuleFor(x => x.Name)
|
|
.NotEmpty().WithMessage("Name is required")
|
|
.MaximumLength(GlobalConsts.StringLengthShort);
|
|
}
|
|
} |