From 5981c65887f5ff821991b1cfdbd787de85ebd12b Mon Sep 17 00:00:00 2001 From: Hotlander Date: Thu, 17 Jan 2019 10:36:50 +0100 Subject: [PATCH] - Added additional validation to OrderLineItem that 'fixes' the issue of a quantity value below 1 --- src/Marello/Bundle/OrderBundle/Resources/config/validation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Marello/Bundle/OrderBundle/Resources/config/validation.yml b/src/Marello/Bundle/OrderBundle/Resources/config/validation.yml index b2ed2ece2..3e00a77ab 100644 --- a/src/Marello/Bundle/OrderBundle/Resources/config/validation.yml +++ b/src/Marello/Bundle/OrderBundle/Resources/config/validation.yml @@ -26,6 +26,8 @@ Marello\Bundle\OrderBundle\Entity\OrderItem: - NotBlank: { groups: [api, Default] } rowTotalExclTax: - NotBlank: { groups: [api, Default] } + quantity: + - GreaterThanOrEqual: 1 constraints: - Marello\Bundle\OrderBundle\Validator\Constraints\AvailableInventory: fields: [quantity, order, product]