2022-01-12 17:28:27 +05:00
|
|
|
using AsbCloudApp.Data;
|
|
|
|
using FluentValidation;
|
|
|
|
|
|
|
|
namespace AsbCloudInfrastructure.Validators
|
|
|
|
{
|
2022-04-11 18:00:34 +05:00
|
|
|
public class WellOperationDtoValidator : AbstractValidator<WellOperationDto>
|
2022-01-12 17:28:27 +05:00
|
|
|
{
|
|
|
|
public WellOperationDtoValidator()
|
|
|
|
{
|
2022-01-20 12:07:15 +05:00
|
|
|
RuleFor(x => x.IdWell).GreaterThan(0)
|
2022-01-12 17:28:27 +05:00
|
|
|
.WithMessage("Id скважины не может быть меньше 1");
|
2022-01-21 17:56:36 +05:00
|
|
|
RuleFor(x => x.Comment).MaximumLength(4096)
|
|
|
|
.WithMessage("Комментарий не может быть длиннее 4096 символов");
|
2022-01-12 17:28:27 +05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|