Symfony\Component\Validator\Constraints\Regex
- Author: Bernhard Schussek <bschussek@gmail.com>
Synopsis
class Regex
extends Constraint
{
- // Inherited constants from Constraint
- const DEFAULT_GROUP = 'Default';
- const CLASS_CONSTRAINT = 'class';
- const PROPERTY_CONSTRAINT = 'property';
- // members
- public string $message;
- public $pattern;
- public $htmlPattern;
- public $match;
- // Inherited members from Constraint
- public array $groups;
- // methods
- public void getDefaultOption()
- public void getRequiredOptions()
- public string|null getHtmlPattern()
- private string|null getNonDelimitedPattern()
- // Inherited methods from Constraint
- public void __construct()
- public void __set()
- public void addImplicitGroupName()
- public string getDefaultOption()
- public array getRequiredOptions()
- public string validatedBy()
- public string|array getTargets()
Hierarchy
Tasks
Line | Task |
---|---|
77+ | reverse pattern in case match=false as per issue #5307 |
Constants
Name | Value |
---|---|
DEFAULT_GROUP | 'Default' |
CLASS_CONSTRAINT | 'class' |
PROPERTY_CONSTRAINT | 'property' |
Members
public
- $groups — array
- $htmlPattern
- $match
- $message
- $pattern
Methods
private
- getNonDelimitedPattern() — Convert the htmlPattern to a suitable format for HTML5 pattern.
public
- getDefaultOption() — {@inheritDoc}
- getHtmlPattern() — Returns htmlPattern if exists or pattern is convertible.
- getRequiredOptions() — {@inheritDoc}
Inherited from Symfony\Component\Validator\Constraint
public
- __set() — Unsupported operation.
- addImplicitGroupName() — Adds the given group if this constraint is in the Default group
- getDefaultOption() — Returns the name of the default option
- getRequiredOptions() — Returns the name of the required options
- getTargets() — Returns whether the constraint can be put onto classes, properties or both
- validatedBy() — Returns the name of the class that validates this constraint