You are here

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\Constraint
View source
class CouponValidConstraint extends Constraint {

  /**
   * The default violation message.
   *
   * @var string
   */
  public $message = 'The provided coupon code is invalid.';

}

Members

Namesort descending Modifiers Type Description Overrides
CouponValidConstraint::$message public property The default violation message.