Skip to content

Commit

Permalink
Merge pull request #46 from IgniteUI/dgdimitrov/datatype-attribute
Browse files Browse the repository at this point in the history
Revert datatype attribute to dtos
  • Loading branch information
ddidgdimitrov-infragistics authored Jan 29, 2025
2 parents 0d72aa7 + 32b3ca2 commit c78d064
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NorthwindCRUD/Models/Dtos/EmployeeDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ public class EmployeeDto : IEmployee
[SwaggerSchema("Title used in salutations")]
public string TitleOfCourtesy { get; set; }

[DataType(DataType.Date, ErrorMessage = "BirthDate must be a valid date.")]
[SwaggerSchema("Employee's birth date")]
public string BirthDate { get; set; }

[DataType(DataType.Date, ErrorMessage = "HireDate must be a valid date.")]
[SwaggerSchema("Employee's hire date")]
public string HireDate { get; set; }

Expand Down
2 changes: 2 additions & 0 deletions NorthwindCRUD/Models/Dtos/OrderDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ public class OrderDto : IOrder

public int ShipperId { get; set; }

[DataType(DataType.Date, ErrorMessage = "OrderDate must be a valid date.")]
public string OrderDate { get; set; }

[DataType(DataType.Date, ErrorMessage = "RequiredDate must be a valid date.")]
public string RequiredDate { get; set; }

public Shipping? ShipVia { get; set; }
Expand Down

0 comments on commit c78d064

Please sign in to comment.