Skip to content

Commit

Permalink
Merge branch 'task/MAR10001-932-add-validation-to-Order-delivery-date…
Browse files Browse the repository at this point in the history
…' into maintenance/3.0
  • Loading branch information
24198 committed Jul 2, 2020
2 parents b6d7f17 + b150ac8 commit f0b0ccd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ Marello\Bundle\OrderBundle\Entity\Order:
- NotBlank: { groups: [Default] }
billingAddress:
- NotBlank: { groups: [Default, commerce], message: 'marello.order.address.validation.billing_not_blank' }

shippingAddress:
- NotBlank: { groups: [Default, commerce], message: 'marello.order.address.validation.shipping_not_blank' }

constraints:
- Marello\Bundle\CoreBundle\Validator\Constraints\GreaterThanDate:
field: 'deliveryDate'
greaterThan: 'today'
nullable: true
errorPath: deliveryDate
message: 'marello.order.delivery_date.messages.error.greater_than_date'
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ marello:
address:
validation:
shipping_not_blank: 'Shipping Address should not be empty'
billing_not_blank: 'Billing Address should not be empty'
billing_not_blank: 'Billing Address should not be empty'

delivery_date:
messages:
error:
greater_than_date: Delivery Date must be greater than %date%

0 comments on commit f0b0ccd

Please sign in to comment.