class RegexConstraint in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RegexConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\RegexConstraint
- 9 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.
Plugin annotation
@Constraint(
id = "Regex",
label = @Translation("Regex", context = "Validation")
)
Hierarchy
- class \Drupal\Core\Validation\Plugin\Validation\Constraint\RegexConstraint extends \Symfony\Component\Validator\Constraints\Regex
Expanded class hierarchy of RegexConstraint
File
- core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ RegexConstraint.php, line 17
Namespace
Drupal\Core\Validation\Plugin\Validation\ConstraintView source
class RegexConstraint extends Regex {
public $message = 'This value is not valid.';
/**
* {@inheritdoc}
*/
public function validatedBy() {
return '\\Symfony\\Component\\Validator\\Constraints\\RegexValidator';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RegexConstraint:: |
public | property | ||
RegexConstraint:: |
public | function |