feat(api): Реализованы JobController, JobGroupController
This commit is contained in:
26
PARR.API/Validators/JobGroupValidator.cs
Normal file
26
PARR.API/Validators/JobGroupValidator.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user