class RegexConstraint

Same name in other branches
  1. 9 core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RegexConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\RegexConstraint
  2. 8.9.x core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RegexConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\RegexConstraint
  3. 11.x core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RegexConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\RegexConstraint

Regex constraint.

Overrides the symfony constraint to use Drupal-style replacement patterns.

Hierarchy

  • class \Drupal\Core\Validation\Plugin\Validation\Constraint\RegexConstraint extends \Symfony\Component\Validator\Constraints\Regex

Expanded class hierarchy of RegexConstraint

2 files declare their use of RegexConstraint
ExtensionNameConstraint.php in core/lib/Drupal/Core/Extension/Plugin/Validation/Constraint/ExtensionNameConstraint.php
Recipe.php in core/lib/Drupal/Core/Recipe/Recipe.php

File

core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RegexConstraint.php, line 14

Namespace

Drupal\Core\Validation\Plugin\Validation\Constraint
View source
class RegexConstraint extends Regex {
    
    /**
     * {@inheritdoc}
     *
     * @return string
     *   The name of the class that validates this constraint.
     *
     * @todo Add method return type declaration.
     * @see https://www.drupal.org/project/drupal/issues/3425150
     */
    public function validatedBy() {
        return '\\Symfony\\Component\\Validator\\Constraints\\RegexValidator';
    }

}

Members

Title Sort descending Modifiers Object type Summary
RegexConstraint::validatedBy public function @todo Add method return type declaration.

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