ValidPathConstraint.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/Path/Plugin/Validation/Constraint/ValidPathConstraint.php
  2. 10 core/lib/Drupal/Core/Path/Plugin/Validation/Constraint/ValidPathConstraint.php
  3. 11.x core/lib/Drupal/Core/Path/Plugin/Validation/Constraint/ValidPathConstraint.php

Namespace

Drupal\Core\Path\Plugin\Validation\Constraint

File

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

View source
<?php

namespace Drupal\Core\Path\Plugin\Validation\Constraint;

use Symfony\Component\Validator\Constraint;

/**
 * Validation constraint for valid system paths.
 *
 * @Constraint(
 *   id = "ValidPath",
 *   label = @Translation("Valid path.", context = "Validation"),
 * )
 */
class ValidPathConstraint extends Constraint {
    
    /**
     * The default violation message.
     *
     * @var string
     */
    public $message = "Either the path '%link_path' is invalid or you do not have access to it.";

}

Classes

Title Deprecated Summary
ValidPathConstraint Validation constraint for valid system paths.

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