feat(api): создан ProcessController+валидация входных данных
This commit is contained in:
17
PARR.API/Validators/ProcessValidator.cs
Normal file
17
PARR.API/Validators/ProcessValidator.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using FluentValidation;
|
||||
using PARR.API.Contracts.V1.Requests;
|
||||
|
||||
namespace PARR.API.Validators
|
||||
{
|
||||
public class ProcessValidator : AbstractValidator<ProcessRequest>
|
||||
{
|
||||
private bool? isValid = null;
|
||||
|
||||
public ProcessValidator()
|
||||
{
|
||||
RuleFor(t => t.Name).NotEmpty().NotNull().WithMessage("Имя процесса не может быть пустым");
|
||||
|
||||
RuleFor(t => t.EsppId).NotEmpty().NotNull().WithMessage("EsppId не может быть пустым");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user