Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity
Constraint for the Unique Entity validator
- Author: Benjamin Eberlei <kontakt@beberlei.de>
Synopsis
class UniqueEntity
extends Constraint
{
- // Inherited constants from Constraint
- const DEFAULT_GROUP = 'Default';
- const CLASS_CONSTRAINT = 'class';
- const PROPERTY_CONSTRAINT = 'property';
- // members
- public string $message;
- public string $service;
- public $em;
- public string $repositoryMethod;
- public array $fields;
- public $errorPath;
- public $ignoreNull;
- // Inherited members from Constraint
- public array $groups;
- // methods
- public void getRequiredOptions()
- public string validatedBy()
- public void getTargets()
- public void getDefaultOption()
- // 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
Constants
Name | Value |
---|---|
DEFAULT_GROUP | 'Default' |
CLASS_CONSTRAINT | 'class' |
PROPERTY_CONSTRAINT | 'property' |
Members
public
- $em
- $errorPath
- $fields
- $groups — array
- $ignoreNull
- $message
- $repositoryMethod
- $service
Methods
public
- getDefaultOption()
- getRequiredOptions()
- getTargets() — {@inheritDoc}
- validatedBy() — The validator must be defined as a service with this name.
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