14 lines
320 B
C#
14 lines
320 B
C#
|
using FluentValidation;
|
|||
|
|
|||
|
namespace Demo.Commands
|
|||
|
{
|
|||
|
public class CreatePersonCommandValidator : AbstractValidator<CreatePersonCommand>
|
|||
|
{
|
|||
|
public CreatePersonCommandValidator()
|
|||
|
{
|
|||
|
RuleFor(t => t.FirstName).NotEmpty();
|
|||
|
RuleFor(t => t.LastName).NotEmpty();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|