RegexConstraint.php
Same filename in other branches
Namespace
Drupal\Core\Validation\Plugin\Validation\ConstraintFile
-
core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ RegexConstraint.php
View source
<?php
namespace Drupal\Core\Validation\Plugin\Validation\Constraint;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Validation\Attribute\Constraint;
use Symfony\Component\Validator\Constraints\Regex;
/**
* Regex constraint.
*
* Overrides the symfony constraint to use Drupal-style replacement patterns.
*/
class RegexConstraint extends Regex {
/**
* {@inheritdoc}
*/
public function validatedBy() : string {
return '\\Symfony\\Component\\Validator\\Constraints\\RegexValidator';
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
RegexConstraint | Regex constraint. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.