27 lines
642 B
C#
27 lines
642 B
C#
using FluentValidation;
|
|
using PARR.API.Contracts.V1.Requests;
|
|
|
|
namespace PARR.API.Validators
|
|
{
|
|
public class JobGroupValidator : AbstractValidator<JobGroupRequest>
|
|
{
|
|
public JobGroupValidator()
|
|
{
|
|
RuleFor(t => t.Name)
|
|
.NotNull().NotEmpty();
|
|
|
|
RuleFor(t => t.ShortDescription)
|
|
.NotNull().NotEmpty();
|
|
|
|
RuleFor(t => t.FullDescription)
|
|
.NotNull().NotEmpty();
|
|
|
|
RuleFor(t => t.Solution)
|
|
.NotNull().NotEmpty();
|
|
|
|
RuleFor(t => t.TemplateDuration)
|
|
.NotNull().NotEmpty();
|
|
}
|
|
}
|
|
}
|