CurrencyConstraint.php in Commerce Core 8.2
File
modules/price/src/Plugin/Validation/Constraint/CurrencyConstraint.phpView source
<?php
namespace Drupal\commerce_price\Plugin\Validation\Constraint;
use Symfony\Component\Validator\Constraint;
/**
* Currency constraint.
*
* @Constraint(
* id = "Currency",
* label = @Translation("Currency", context = "Validation"),
* type = { "commerce_price" }
* )
*/
class CurrencyConstraint extends Constraint {
public $availableCurrencies = [];
public $invalidMessage = 'The currency %value is not valid.';
public $notAvailableMessage = 'The currency %value is not available.';
}
Classes
Name | Description |
---|---|
CurrencyConstraint | Currency constraint. |