Skip to content

Commit 0608a70

Browse files
committed
Remove minimum length constraint on EmployeeId as this validation is applicable only for string and collection types.
The minimum length attribute previously applied to EmployeeId in EmployeeDto.cs was removed. There were unnecessary limitations being put on the EmployeeId property, which is intended to be automatically generated and required, but not to impose a minimum length.
1 parent 8d3739e commit 0608a70

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

NorthwindCRUD/Models/Dtos/EmployeeDto.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace NorthwindCRUD.Models.Dtos
77
public class EmployeeDto : IEmployee
88
{
99
[SwaggerSchema("Number automatically assigned to new employee.")]
10-
[MinLength(8)] // Min length comes from IdGenerator.CreateDigitsId
1110
[Required]
1211
public int EmployeeId { get; set; }
1312

0 commit comments

Comments
 (0)