function StringEqualsConcatenatedValuesConstraint::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/StringEqualsConcatenatedValuesConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\StringEqualsConcatenatedValuesConstraint::__construct()
Constructs a StringEqualsConcatenatedValuesConstraint object.
Parameters
string $separator: The separator separating the values.
array $values: The mappings to values to concatenate together.
array|null $reservedCharacters: Reserved characters — if any — that are to be substituted in each value.
string|null $reservedCharactersSubstitute: Any reserved characters that will be substituted by this character.
string $message: The error message if the string does not match.
array|null $groups: An array of validation groups.
mixed|null $payload: Domain-specific data attached to a constraint.
File
-
core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ StringEqualsConcatenatedValuesConstraint.php, line 38
Class
- StringEqualsConcatenatedValuesConstraint
- Checks a string consists of specific values found in the mapping.
Namespace
Drupal\Core\Validation\Plugin\Validation\ConstraintCode
public function __construct(public string $separator, public array $values, public ?array $reservedCharacters = [], public ?string $reservedCharactersSubstitute = NULL, public string $message = "Expected '@expected_string', not '@value'. Format: '@expected_format'.", ?array $groups = NULL, mixed $payload = NULL) {
parent::__construct(groups: $groups, payload: $payload);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.