api/symfony/Component/Validator/Constraints/Unique.yaml
2024-09-26 02:03:21 -07:00

54 lines
2.5 KiB
YAML

name: Unique
class_comment: null
dependencies:
- name: Constraint
type: class
source: Symfony\Component\Validator\Constraint
- name: InvalidArgumentException
type: class
source: Symfony\Component\Validator\Exception\InvalidArgumentException
properties:
- name: normalizer
visibility: public
comment: "# * Validates that all the elements of the given collection are unique.\n\
# *\n# * @author Yevgeniy Zholkevskiy <zhenya.zholkevskiy@gmail.com>\n# */\n#\
\ #[\\Attribute(\\Attribute::TARGET_PROPERTY | \\Attribute::TARGET_METHOD | \\\
Attribute::IS_REPEATABLE)]\n# class Unique extends Constraint\n# {\n# public const\
\ IS_NOT_UNIQUE = '7911c98d-b845-4da0-94b7-a8dac36bc55a';\n# \n# public array|string\
\ $fields = [];\n# public ?string $errorPath = null;\n# \n# protected const ERROR_NAMES\
\ = [\n# self::IS_NOT_UNIQUE => 'IS_NOT_UNIQUE',\n# ];\n# \n# public string $message\
\ = 'This collection should contain only unique elements.';\n# /** @var callable|null"
methods:
- name: __construct
visibility: public
parameters:
- name: options
default: 'null'
- name: message
default: 'null'
- name: normalizer
default: 'null'
- name: groups
default: 'null'
- name: payload
default: 'null'
- name: fields
default: 'null'
- name: errorPath
default: 'null'
comment: "# * Validates that all the elements of the given collection are unique.\n\
# *\n# * @author Yevgeniy Zholkevskiy <zhenya.zholkevskiy@gmail.com>\n# */\n#\
\ #[\\Attribute(\\Attribute::TARGET_PROPERTY | \\Attribute::TARGET_METHOD | \\\
Attribute::IS_REPEATABLE)]\n# class Unique extends Constraint\n# {\n# public const\
\ IS_NOT_UNIQUE = '7911c98d-b845-4da0-94b7-a8dac36bc55a';\n# \n# public array|string\
\ $fields = [];\n# public ?string $errorPath = null;\n# \n# protected const ERROR_NAMES\
\ = [\n# self::IS_NOT_UNIQUE => 'IS_NOT_UNIQUE',\n# ];\n# \n# public string $message\
\ = 'This collection should contain only unique elements.';\n# /** @var callable|null\
\ */\n# public $normalizer;\n# \n# /**\n# * @param array<string,mixed>|null $options\n\
# * @param string[]|null $groups\n# * @param string[]|string|null \
\ $fields Defines the key or keys in the collection that should be checked\
\ for uniqueness (defaults to null, which ensure uniqueness for all keys)"
traits:
- Symfony\Component\Validator\Constraint
- Symfony\Component\Validator\Exception\InvalidArgumentException
interfaces: []