File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
NorthwindCRUD/Models/Dtos Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,11 @@ public class EmployeeDto : IEmployee
2222 [ SwaggerSchema ( "Title used in salutations" ) ]
2323 public string TitleOfCourtesy { get ; set ; }
2424
25+ [ DataType ( DataType . Date , ErrorMessage = "BirthDate must be a valid date." ) ]
2526 [ SwaggerSchema ( "Employee's birth date" ) ]
2627 public string BirthDate { get ; set ; }
2728
29+ [ DataType ( DataType . Date , ErrorMessage = "HireDate must be a valid date." ) ]
2830 [ SwaggerSchema ( "Employee's hire date" ) ]
2931 public string HireDate { get ; set ; }
3032
Original file line number Diff line number Diff line change @@ -15,8 +15,10 @@ public class OrderDto : IOrder
1515
1616 public int ShipperId { get ; set ; }
1717
18+ [ DataType ( DataType . Date , ErrorMessage = "OrderDate must be a valid date." ) ]
1819 public string OrderDate { get ; set ; }
1920
21+ [ DataType ( DataType . Date , ErrorMessage = "RequiredDate must be a valid date." ) ]
2022 public string RequiredDate { get ; set ; }
2123
2224 public Shipping ? ShipVia { get ; set ; }
You can’t perform that action at this time.
0 commit comments