using Cloud.Enums; using Cloud.Requests; using FluentValidation; namespace Cloud.Validation { public class ValveValidator : AbstractValidator { public ValveValidator() { RuleFor(request => request.Action) .NotEmpty().WithMessage("Action can't be empty"). IsEnumName(typeof (ValveEnum)).WithMessage("Action is not correct"); } } }