I am currently developing a Website in which user may buy gift cards. I am using a three step form using the CraueFormFlow bundle and everything is concerning the steps. I a
I'd suggest using Expression constraint. This constraint can be applied on form field or (preferably) in entity:
/**
* @var int
* @Assert\Type(type="integer")
*/
private $amountGiftCards25;
/**
* @var int
* @Assert\Type(type="integer")
* @Assert\Expression(expression="this.getAmountGiftCards25() > 0 or value > 0", message="Please choose amount of gift cards.")
*/
private $amountGiftCards50;