function Currency::__construct
Parameters
array<string,mixed>|null $options:
string[]|null $groups:
Overrides Constraint::__construct
File
-
vendor/
symfony/ validator/ Constraints/ Currency.php, line 41
Class
- Currency
- Validates that a value is a valid 3-letter ISO 4217 currency name.
Namespace
Symfony\Component\Validator\ConstraintsCode
public function __construct(?array $options = null, ?string $message = null, ?array $groups = null, mixed $payload = null) {
if (!class_exists(Currencies::class)) {
throw new LogicException('The Intl component is required to use the Currency constraint. Try running "composer require symfony/intl".');
}
parent::__construct($options, $groups, $payload);
$this->message = $message ?? $this->message;
}