Skip to content
Snippets Groups Projects

Validation added

Closes #3458321

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
249 * @param \Symfony\Component\Validator\Context\ExecutionContextInterface $context
250 * The validation execution context.
251 *
252 * @see \Symfony\Component\Validator\Constraints\CallbackValidator
253 * @see core/modules/language/config/schema/language.schema.yml
254 */
255 public static function validateId(string $value, ExecutionContextInterface $context): void {
256 $config_being_validated = $context->getRoot();
257 $target_entity_type_id = $config_being_validated->get('target_entity_type_id')->getValue();
258 $target_bundle = $config_being_validated->get('target_bundle')->getValue();
259 if ($target_entity_type_id . '.' . $target_bundle !== $value) {
260 $context->addViolation('The id %value must be a combination of $target_entity_type_id.$target_bundle.', [
261 '%value' => $value,
262 ]);
263 }
264 }
  • added 16 commits

    Compare with previous version

  • Please register or sign in to reply
    Loading