function Charset::__construct
Overrides Constraint::__construct
File
-
vendor/
symfony/ validator/ Constraints/ Charset.php, line 30
Class
- Charset
- @author Alexandre Daubois <alex.daubois@gmail.com>
Namespace
Symfony\Component\Validator\ConstraintsCode
public function __construct(array|string $encodings = [], string $message = 'The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}.', ?array $groups = null, mixed $payload = null) {
parent::__construct(null, $groups, $payload);
if ([] === $this->encodings) {
throw new ConstraintDefinitionException(\sprintf('The "%s" constraint requires at least one encoding.', static::class));
}
}