You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature(#2): this commit adds validation rules for the address field when fulfillment is delivery, requiring related fields to be filled in, with validation of the Brazilian ZIP code format
Copy file name to clipboardExpand all lines: Boundaries/Comanda.Orchestrator/Source/Comanda.Orchestrator.Application/Validators/Orders/OrderCreationSchemeValidator.cs
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,11 @@ public OrderCreationSchemeValidator()
12
12
.IsInEnum()
13
13
.WithMessage("fulfillment must be a valid enum value.");
14
14
15
+
RuleFor(order =>order.Address)
16
+
.NotNull()
17
+
.WithMessage("address must be provided when fulfillment is delivery.")
0 commit comments