forked from ddrilling/AsbCloudServer
16 lines
583 B
C#
16 lines
583 B
C#
|
using AsbCloudApp.Data;
|
||
|
using FluentValidation;
|
||
|
|
||
|
namespace AsbCloudInfrastructure.Validators
|
||
|
{
|
||
|
public class WellDtoValidator : AbstractValidator<WellDto>
|
||
|
{
|
||
|
public WellDtoValidator()
|
||
|
{
|
||
|
RuleFor(x => x.Latitude).Must(lat => lat is <= 90 and >= -90)
|
||
|
.WithMessage("Допустимые значения широты от -90 до 90");
|
||
|
RuleFor(x => x.Longitude).Must(lat => lat is <= 180 and >= -180)
|
||
|
.WithMessage("Допустимые значения долготы от -180 до 180");
|
||
|
}
|
||
|
}
|
||
|
}
|