class CouponValidConstraint in Commerce Cart API 8
Coupon valid reference constraint.
Verifies that coupon applies to the order.
Plugin annotation
@Constraint(
id = "CouponValid",
label = @Translation("Coupon valid reference", context = "Validation")
)
Hierarchy
- class \Drupal\commerce_cart_api\Plugin\Validation\Constraint\CouponValidConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of CouponValidConstraint
File
- src/
Plugin/ Validation/ Constraint/ CouponValidConstraint.php, line 17
Namespace
Drupal\commerce_cart_api\Plugin\Validation\ConstraintView source
class CouponValidConstraint extends Constraint {
/**
* The default violation message.
*
* @var string
*/
public $message = 'The coupon %code is not available for this order.';
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CouponValidConstraint:: |
public | property | The default violation message. |