10 lines
275 B
C#
10 lines
275 B
C#
using FluentValidation;
|
|
|
|
public class CreateOrderRequestValidator : AbstractValidator<CreateOrderRequest>
|
|
{
|
|
public CreateOrderRequestValidator()
|
|
{
|
|
RuleFor(x => x.Description).NotEmpty();
|
|
RuleFor(x => x.OrderedBy).NotEmpty().MaximumLength(200);
|
|
}
|
|
} |