-
Notifications
You must be signed in to change notification settings - Fork 1
_🛠️ Refactor suggestion_ #73
Copy link
Copy link
Open
Description
🛠️ Refactor suggestion
Introduce validation attributes
Decorate critical fields with DataAnnotations (e.g., [Required], [StringLength(...)], [Range(0, …)]) or implement a FluentValidation validator to enforce business rules on Title, Description, Price, Condition, Street, City, and ExpireDate.
🤖 Prompt for AI Agents
In Dentizone.Application/DTOs/PostDTO/UpdatePostDTO.cs between lines 12 and 18,
the properties lack validation attributes. Add appropriate DataAnnotations such
as [Required] for mandatory fields, [StringLength] to limit text length on
Title, Description, Street, and City, [Range(0, max)] for Price to ensure
non-negative values, and consider validation for Condition and ExpireDate as
needed. This will enforce business rules and improve data integrity.
Originally posted by @coderabbitai[bot] in #72 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels