dotnet-cqrs/Demo/Commands/CreatePersonCommandValidator.cs

14 lines
320 B
C#
Raw Normal View History

2021-02-03 10:50:28 -05:00
using FluentValidation;
namespace Demo.Commands
{
public class CreatePersonCommandValidator : AbstractValidator<CreatePersonCommand>
{
public CreatePersonCommandValidator()
{
RuleFor(t => t.FirstName).NotEmpty();
RuleFor(t => t.LastName).NotEmpty();
}
}
}