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