diff --git a/AsbCloudApp/Data/WellOperationDto.cs b/AsbCloudApp/Data/WellOperationDto.cs
index 48ff9e30..9d8b631c 100644
--- a/AsbCloudApp/Data/WellOperationDto.cs
+++ b/AsbCloudApp/Data/WellOperationDto.cs
@@ -16,7 +16,6 @@ namespace AsbCloudApp.Data
///
[Required]
- [Range(1, int.MaxValue, ErrorMessage = "Id скважины не может быть меньше 1")]
public int IdWell { get; set; }
///
diff --git a/AsbCloudWebApi/Controllers/WellOperationController.cs b/AsbCloudWebApi/Controllers/WellOperationController.cs
index a674b365..ba91097b 100644
--- a/AsbCloudWebApi/Controllers/WellOperationController.cs
+++ b/AsbCloudWebApi/Controllers/WellOperationController.cs
@@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
@@ -199,8 +200,10 @@ namespace AsbCloudWebApi.Controllers
[HttpPost]
[Permission]
[ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)]
- public async Task InsertRangeAsync(int idWell, [FromBody] IEnumerable values,
- CancellationToken token)
+ public async Task InsertRangeAsync(
+ [Range(1, int.MaxValue, ErrorMessage = "Id скважины не может быть меньше 1")] int idWell,
+ [FromBody] IEnumerable values,
+ CancellationToken token)
{
if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))
return Forbid();