api/symfony/Component/Validator/Constraints/Length.yaml

107 lines
6 KiB
YAML
Raw Permalink Normal View History

2024-09-26 09:03:21 +00:00
name: Length
class_comment: null
dependencies:
- name: Constraint
type: class
source: Symfony\Component\Validator\Constraint
- name: InvalidArgumentException
type: class
source: Symfony\Component\Validator\Exception\InvalidArgumentException
- name: MissingOptionsException
type: class
source: Symfony\Component\Validator\Exception\MissingOptionsException
properties:
- name: normalizer
visibility: public
comment: "# * Validates that a given string length is between some minimum and maximum\
\ value.\n# *\n# * @author Bernhard Schussek <bschussek@gmail.com>\n# */\n# #[\\\
Attribute(\\Attribute::TARGET_PROPERTY | \\Attribute::TARGET_METHOD | \\Attribute::IS_REPEATABLE)]\n\
# class Length extends Constraint\n# {\n# public const TOO_SHORT_ERROR = '9ff3fdc4-b214-49db-8718-39c315e33d45';\n\
# public const TOO_LONG_ERROR = 'd94b19cc-114f-4f44-9cc4-4138e80a87b9';\n# public\
\ const NOT_EQUAL_LENGTH_ERROR = '4b6f5c76-22b4-409d-af16-fbe823ba9332';\n# public\
\ const INVALID_CHARACTERS_ERROR = '35e6a710-aa2e-4719-b58e-24b35749b767';\n#\
\ \n# protected const ERROR_NAMES = [\n# self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR',\n\
# self::TOO_LONG_ERROR => 'TOO_LONG_ERROR',\n# self::NOT_EQUAL_LENGTH_ERROR =>\
\ 'NOT_EQUAL_LENGTH_ERROR',\n# self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR',\n\
# ];\n# \n# public const COUNT_BYTES = 'bytes';\n# public const COUNT_CODEPOINTS\
\ = 'codepoints';\n# public const COUNT_GRAPHEMES = 'graphemes';\n# \n# private\
\ const VALID_COUNT_UNITS = [\n# self::COUNT_BYTES,\n# self::COUNT_CODEPOINTS,\n\
# self::COUNT_GRAPHEMES,\n# ];\n# \n# public string $maxMessage = 'This value\
\ is too long. It should have {{ limit }} character or less.|This value is too\
\ long. It should have {{ limit }} characters or less.';\n# public string $minMessage\
\ = 'This value is too short. It should have {{ limit }} character or more.|This\
\ value is too short. It should have {{ limit }} characters or more.';\n# public\
\ string $exactMessage = 'This value should have exactly {{ limit }} character.|This\
\ value should have exactly {{ limit }} characters.';\n# public string $charsetMessage\
\ = 'This value does not match the expected {{ charset }} charset.';\n# public\
\ ?int $max = null;\n# public ?int $min = null;\n# public string $charset = 'UTF-8';\n\
# /** @var callable|null"
methods:
- name: __construct
visibility: public
parameters:
- name: exactly
default: 'null'
- name: min
default: 'null'
- name: max
default: 'null'
- name: charset
default: 'null'
- name: normalizer
default: 'null'
- name: countUnit
default: 'null'
- name: exactMessage
default: 'null'
- name: minMessage
default: 'null'
- name: maxMessage
default: 'null'
- name: charsetMessage
default: 'null'
- name: groups
default: 'null'
- name: payload
default: 'null'
- name: options
default: '[]'
comment: "# * Validates that a given string length is between some minimum and maximum\
\ value.\n# *\n# * @author Bernhard Schussek <bschussek@gmail.com>\n# */\n# #[\\\
Attribute(\\Attribute::TARGET_PROPERTY | \\Attribute::TARGET_METHOD | \\Attribute::IS_REPEATABLE)]\n\
# class Length extends Constraint\n# {\n# public const TOO_SHORT_ERROR = '9ff3fdc4-b214-49db-8718-39c315e33d45';\n\
# public const TOO_LONG_ERROR = 'd94b19cc-114f-4f44-9cc4-4138e80a87b9';\n# public\
\ const NOT_EQUAL_LENGTH_ERROR = '4b6f5c76-22b4-409d-af16-fbe823ba9332';\n# public\
\ const INVALID_CHARACTERS_ERROR = '35e6a710-aa2e-4719-b58e-24b35749b767';\n#\
\ \n# protected const ERROR_NAMES = [\n# self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR',\n\
# self::TOO_LONG_ERROR => 'TOO_LONG_ERROR',\n# self::NOT_EQUAL_LENGTH_ERROR =>\
\ 'NOT_EQUAL_LENGTH_ERROR',\n# self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR',\n\
# ];\n# \n# public const COUNT_BYTES = 'bytes';\n# public const COUNT_CODEPOINTS\
\ = 'codepoints';\n# public const COUNT_GRAPHEMES = 'graphemes';\n# \n# private\
\ const VALID_COUNT_UNITS = [\n# self::COUNT_BYTES,\n# self::COUNT_CODEPOINTS,\n\
# self::COUNT_GRAPHEMES,\n# ];\n# \n# public string $maxMessage = 'This value\
\ is too long. It should have {{ limit }} character or less.|This value is too\
\ long. It should have {{ limit }} characters or less.';\n# public string $minMessage\
\ = 'This value is too short. It should have {{ limit }} character or more.|This\
\ value is too short. It should have {{ limit }} characters or more.';\n# public\
\ string $exactMessage = 'This value should have exactly {{ limit }} character.|This\
\ value should have exactly {{ limit }} characters.';\n# public string $charsetMessage\
\ = 'This value does not match the expected {{ charset }} charset.';\n# public\
\ ?int $max = null;\n# public ?int $min = null;\n# public string $charset = 'UTF-8';\n\
# /** @var callable|null */\n# public $normalizer;\n# /** @var self::COUNT_* */\n\
# public string $countUnit = self::COUNT_CODEPOINTS;\n# \n# /**\n# * @param int|array<string,mixed>|null\
\ $exactly The exact expected length\n# * @param int|null \
\ $min The minimum expected length\n# * @param int|null \
\ $max The maximum expected length\n# * @param string|null \
\ $charset The charset to be used when computing value's length\
\ (defaults to UTF-8)\n# * @param callable|null $normalizer A callable\
\ to normalize value before it is validated\n# * @param self::COUNT_*|null \
\ $countUnit The character count unit for the length check (defaults to\
\ {@see Length::COUNT_CODEPOINTS})\n# * @param string[]|null $groups\n\
# * @param array<string,mixed> $options"
traits:
- Symfony\Component\Validator\Constraint
- Symfony\Component\Validator\Exception\InvalidArgumentException
- Symfony\Component\Validator\Exception\MissingOptionsException
interfaces: []