class ValidPathConstraint

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Path/Plugin/Validation/Constraint/ValidPathConstraint.php \Drupal\Core\Path\Plugin\Validation\Constraint\ValidPathConstraint
  2. 10 core/lib/Drupal/Core/Path/Plugin/Validation/Constraint/ValidPathConstraint.php \Drupal\Core\Path\Plugin\Validation\Constraint\ValidPathConstraint
  3. 9 core/lib/Drupal/Core/Path/Plugin/Validation/Constraint/ValidPathConstraint.php \Drupal\Core\Path\Plugin\Validation\Constraint\ValidPathConstraint
  4. 8.9.x core/lib/Drupal/Core/Path/Plugin/Validation/Constraint/ValidPathConstraint.php \Drupal\Core\Path\Plugin\Validation\Constraint\ValidPathConstraint

Validation constraint for valid system paths.

Attributes

#[Constraint(id: 'ValidPath', label: new TranslatableMarkup('Valid path.', [], [ 'context' => 'Validation', ]))]

Hierarchy

  • class \Drupal\Core\Path\Plugin\Validation\Constraint\ValidPathConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of ValidPathConstraint

File

core/lib/Drupal/Core/Path/Plugin/Validation/Constraint/ValidPathConstraint.php, line 13

Namespace

Drupal\Core\Path\Plugin\Validation\Constraint
View source
class ValidPathConstraint extends SymfonyConstraint {
  public function __construct(mixed $options = NULL, public $message = "Either the path '%link_path' is invalid or you do not have access to it.", ?array $groups = NULL, mixed $payload = NULL) {
    parent::__construct($options, $groups, $payload);
  }

}

Members

Title Sort descending Modifiers Object type Summary
ValidPathConstraint::__construct public function #[HasNamedArguments]

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.