12 lines
No EOL
327 B
C#
12 lines
No EOL
327 B
C#
using FluentValidation;
|
|
using GitHubActionsDemo.Api.Contract;
|
|
namespace GitHubActionsDemo.Api.Models.Validators;
|
|
|
|
public class AuthorRequestValidator : AbstractValidator<AuthorRequest>
|
|
{
|
|
public AuthorRequestValidator()
|
|
{
|
|
RuleFor(x => x.FirstName).NotEmpty();
|
|
RuleFor(x => x.LastName).NotEmpty();
|
|
}
|
|
} |