You are here

class CurrencyConstraint in Price 8

Same name and namespace in other branches
  1. 3.x src/Plugin/Validation/Constraint/CurrencyConstraint.php \Drupal\price\Plugin\Validation\Constraint\CurrencyConstraint
  2. 2.0.x src/Plugin/Validation/Constraint/CurrencyConstraint.php \Drupal\price\Plugin\Validation\Constraint\CurrencyConstraint
  3. 2.x src/Plugin/Validation/Constraint/CurrencyConstraint.php \Drupal\price\Plugin\Validation\Constraint\CurrencyConstraint
  4. 3.0.x src/Plugin/Validation/Constraint/CurrencyConstraint.php \Drupal\price\Plugin\Validation\Constraint\CurrencyConstraint

Currency constraint.

Plugin annotation


@Constraint(
  id = "Currency",
  label = @Translation("Currency", context = "Validation"),
  type = {
    "price_price",
    "price_modified"
  }
)

Hierarchy

  • class \Drupal\price\Plugin\Validation\Constraint\CurrencyConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of CurrencyConstraint

File

src/Plugin/Validation/Constraint/CurrencyConstraint.php, line 19

Namespace

Drupal\price\Plugin\Validation\Constraint
View source
class CurrencyConstraint extends Constraint {
  public $availableCurrencies = [];
  public $invalidMessage = 'The currency %value is not valid.';
  public $notAvailableMessage = 'The currency %value is not available.';

}

Members