From 1e6d1304681e4942adf30faf9987dc1051236948 Mon Sep 17 00:00:00 2001 From: Andrii Popov Date: Sat, 27 Mar 2021 09:27:39 +0200 Subject: [PATCH] [Validator] Add missing backticks for constraint option names --- reference/constraints/Bic.rst | 16 +-- reference/constraints/CardScheme.rst | 8 +- reference/constraints/Choice.rst | 36 +++--- reference/constraints/Count.rst | 20 ++-- reference/constraints/DateTime.rst | 4 +- reference/constraints/DivisibleBy.rst | 4 +- reference/constraints/Email.rst | 16 +-- reference/constraints/Expression.rst | 4 +- reference/constraints/File.rst | 64 +++++------ reference/constraints/Image.rst | 108 +++++++++--------- reference/constraints/Ip.rst | 8 +- reference/constraints/Isbn.rst | 20 ++-- reference/constraints/Issn.rst | 12 +- reference/constraints/Json.rst | 4 +- reference/constraints/Length.rst | 28 ++--- reference/constraints/Locale.rst | 4 +- reference/constraints/Negative.rst | 4 +- reference/constraints/NegativeOrZero.rst | 4 +- reference/constraints/NotBlank.rst | 4 +- .../constraints/NotCompromisedPassword.rst | 12 +- reference/constraints/Positive.rst | 4 +- reference/constraints/PositiveOrZero.rst | 4 +- reference/constraints/Range.rst | 32 +++--- reference/constraints/Regex.rst | 16 +-- reference/constraints/Timezone.rst | 16 +-- reference/constraints/Type.rst | 8 +- reference/constraints/Unique.rst | 4 +- reference/constraints/UniqueEntity.rst | 24 ++-- reference/constraints/Url.rst | 20 ++-- reference/constraints/Valid.rst | 4 +- .../constraints/_normalizer-option.rst.inc | 4 +- 31 files changed, 258 insertions(+), 258 deletions(-) diff --git a/reference/constraints/Bic.rst b/reference/constraints/Bic.rst index 6496ae63d54..0d00fca6297 100644 --- a/reference/constraints/Bic.rst +++ b/reference/constraints/Bic.rst @@ -87,8 +87,8 @@ Available Options .. include:: /reference/constraints/_groups-option.rst.inc -iban -~~~~ +``iban`` +~~~~~~~~ **type**: ``string`` **default**: ``null`` @@ -98,8 +98,8 @@ iban An IBAN value to validate that its country code is the same as the BIC's one. -ibanMessage -~~~~~~~~~~~ +``ibanMessage`` +~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.`` @@ -109,8 +109,8 @@ ibanMessage The default message supplied when the value does not pass the combined BIC/IBAN check. -ibanPropertyPath -~~~~~~~~~~~~~~~~ +``ibanPropertyPath`` +~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``null`` @@ -124,8 +124,8 @@ For example, if you want to compare the ``$bic`` property of some object with regard to the ``$iban`` property of the same object, use ``ibanPropertyPath="iban"`` in the comparison constraint of ``$bic``. -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This is not a valid Business Identifier Code (BIC).`` diff --git a/reference/constraints/CardScheme.rst b/reference/constraints/CardScheme.rst index 6362d9932ee..e8e2b744987 100644 --- a/reference/constraints/CardScheme.rst +++ b/reference/constraints/CardScheme.rst @@ -99,8 +99,8 @@ Available Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``Unsupported card type or invalid card number.`` @@ -116,8 +116,8 @@ Parameter Description .. include:: /reference/constraints/_payload-option.rst.inc -schemes -~~~~~~~ +``schemes`` +~~~~~~~~~~~ **type**: ``mixed`` [:ref:`default option `] diff --git a/reference/constraints/Choice.rst b/reference/constraints/Choice.rst index b1407c8add0..0e099053775 100644 --- a/reference/constraints/Choice.rst +++ b/reference/constraints/Choice.rst @@ -275,8 +275,8 @@ you can pass the class name and the method as an array. Available Options ----------------- -callback -~~~~~~~~ +``callback`` +~~~~~~~~~~~~ **type**: ``string|array|Closure`` @@ -284,8 +284,8 @@ This is a callback method that can be used instead of the `choices`_ option to return the choices array. See `Supplying the Choices with a Callback Function`_ for details on its usage. -choices -~~~~~~~ +``choices`` +~~~~~~~~~~~ **type**: ``array`` [:ref:`default option `] @@ -295,8 +295,8 @@ will be matched against this array. .. include:: /reference/constraints/_groups-option.rst.inc -max -~~~ +``max`` +~~~~~~~ **type**: ``integer`` @@ -305,8 +305,8 @@ to force no more than XX number of values to be selected. For example, if ``max`` is 3, but the input array contains 4 valid items, the validation will fail. -maxMessage -~~~~~~~~~~ +``maxMessage`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``You must select at most {{ limit }} choices.`` @@ -326,8 +326,8 @@ Parameter Description The ``{{ choices }}`` parameter was introduced in Symfony 4.3. -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``The value you selected is not a valid choice.`` @@ -344,8 +344,8 @@ Parameter Description ``{{ value }}`` The current (invalid) value ================= ============================================================ -min -~~~ +``min`` +~~~~~~~ **type**: ``integer`` @@ -354,8 +354,8 @@ to force at least XX number of values to be selected. For example, if ``min`` is 3, but the input array only contains 2 valid items, the validation will fail. -minMessage -~~~~~~~~~~ +``minMessage`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``You must select at least {{ limit }} choices.`` @@ -375,8 +375,8 @@ Parameter Description The ``{{ choices }}`` parameter was introduced in Symfony 4.3. -multiple -~~~~~~~~ +``multiple`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -385,8 +385,8 @@ of a single, scalar value. The constraint will check that each value of the input array can be found in the array of valid choices. If even one of the input values cannot be found, the validation will fail. -multipleMessage -~~~~~~~~~~~~~~~ +``multipleMessage`` +~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``One or more of the given values is invalid.`` diff --git a/reference/constraints/Count.rst b/reference/constraints/Count.rst index 2ff99b5adbb..dbbe94b480a 100644 --- a/reference/constraints/Count.rst +++ b/reference/constraints/Count.rst @@ -101,8 +101,8 @@ you might add the following: Options ------- -exactMessage -~~~~~~~~~~~~ +``exactMessage`` +~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``This collection should contain exactly {{ limit }} elements.`` @@ -120,8 +120,8 @@ Parameter Description .. include:: /reference/constraints/_groups-option.rst.inc -max -~~~ +``max`` +~~~~~~~ **type**: ``integer`` @@ -130,8 +130,8 @@ collection elements count is **greater** than this max value. This option is required when the ``min`` option is not defined. -maxMessage -~~~~~~~~~~ +``maxMessage`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``This collection should contain {{ limit }} elements or less.`` @@ -147,8 +147,8 @@ Parameter Description ``{{ limit }}`` The upper limit =============== ============================================================== -min -~~~ +``min`` +~~~~~~~ **type**: ``integer`` @@ -157,8 +157,8 @@ collection elements count is **less** than this min value. This option is required when the ``max`` option is not defined. -minMessage -~~~~~~~~~~ +``minMessage`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``This collection should contain {{ limit }} elements or more.`` diff --git a/reference/constraints/DateTime.rst b/reference/constraints/DateTime.rst index 41b4db2acc0..c3a9c328932 100644 --- a/reference/constraints/DateTime.rst +++ b/reference/constraints/DateTime.rst @@ -84,8 +84,8 @@ Basic Usage Options ------- -format -~~~~~~ +``format`` +~~~~~~~~~~ **type**: ``string`` **default**: ``Y-m-d H:i:s`` diff --git a/reference/constraints/DivisibleBy.rst b/reference/constraints/DivisibleBy.rst index f4ae78ab0f8..73b0a9c88b6 100644 --- a/reference/constraints/DivisibleBy.rst +++ b/reference/constraints/DivisibleBy.rst @@ -104,8 +104,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value should be a multiple of {{ compared_value }}.`` diff --git a/reference/constraints/Email.rst b/reference/constraints/Email.rst index 5b149f0bf5f..5cbeaeb4523 100644 --- a/reference/constraints/Email.rst +++ b/reference/constraints/Email.rst @@ -92,8 +92,8 @@ Basic Usage Options ------- -checkHost -~~~~~~~~~ +``checkHost`` +~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -105,8 +105,8 @@ If true, then the :phpfunction:`checkdnsrr` PHP function will be used to check the validity of the MX *or* the A *or* the AAAA record of the host of the given email. -checkMX -~~~~~~~ +``checkMX`` +~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -124,8 +124,8 @@ check the validity of the MX record of the host of the given email. .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not a valid email address.`` @@ -139,8 +139,8 @@ Parameter Description ``{{ value }}`` The current (invalid) value =============== ============================================================== -mode -~~~~ +``mode`` +~~~~~~~~ **type**: ``string`` **default**: ``loose`` diff --git a/reference/constraints/Expression.rst b/reference/constraints/Expression.rst index f3af00f1d3a..fbcbfc9c2b2 100644 --- a/reference/constraints/Expression.rst +++ b/reference/constraints/Expression.rst @@ -264,8 +264,8 @@ Parameter Description .. include:: /reference/constraints/_payload-option.rst.inc -values -~~~~~~ +``values`` +~~~~~~~~~~ **type**: ``array`` **default**: ``[]`` diff --git a/reference/constraints/File.rst b/reference/constraints/File.rst index a865349f913..bc93caf83d1 100644 --- a/reference/constraints/File.rst +++ b/reference/constraints/File.rst @@ -158,8 +158,8 @@ have been specified. Options ------- -binaryFormat -~~~~~~~~~~~~ +``binaryFormat`` +~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``null`` @@ -171,8 +171,8 @@ the value defined in the ``maxSize`` option. For more information about the difference between binary and SI prefixes, see `Wikipedia: Binary prefix`_. -disallowEmptyMessage -~~~~~~~~~~~~~~~~~~~~ +``disallowEmptyMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``An empty file is not allowed.`` @@ -190,8 +190,8 @@ Parameter Description .. include:: /reference/constraints/_groups-option.rst.inc -maxSize -~~~~~~~ +``maxSize`` +~~~~~~~~~~~ **type**: ``mixed`` @@ -212,8 +212,8 @@ Suffix Unit Name Value Example For more information about the difference between binary and SI prefixes, see `Wikipedia: Binary prefix`_. -maxSizeMessage -~~~~~~~~~~~~~~ +``maxSizeMessage`` +~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.`` @@ -231,8 +231,8 @@ Parameter Description ``{{ suffix }}`` Suffix for the used file size unit (see above) ================ ============================================================= -mimeTypes -~~~~~~~~~ +``mimeTypes`` +~~~~~~~~~~~~~ **type**: ``array`` or ``string`` @@ -256,8 +256,8 @@ You can find a list of existing mime types on the `IANA website`_. This feature was introduced in Symfony 4.4. -mimeTypesMessage -~~~~~~~~~~~~~~~~ +``mimeTypesMessage`` +~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.`` @@ -275,8 +275,8 @@ Parameter Description ``{{ types }}`` The list of allowed MIME types =============== ============================================================== -notFoundMessage -~~~~~~~~~~~~~~~ +``notFoundMessage`` +~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file could not be found.`` @@ -292,8 +292,8 @@ Parameter Description ``{{ file }}`` Absolute file path =============== ============================================================== -notReadableMessage -~~~~~~~~~~~~~~~~~~ +``notReadableMessage`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file is not readable.`` @@ -310,8 +310,8 @@ Parameter Description .. include:: /reference/constraints/_payload-option.rst.inc -uploadCantWriteErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadCantWriteErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``Cannot write temporary file to disk.`` @@ -320,8 +320,8 @@ temporary folder. This message has no parameters. -uploadErrorMessage -~~~~~~~~~~~~~~~~~~ +``uploadErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file could not be uploaded.`` @@ -330,8 +330,8 @@ for some unknown reason. This message has no parameters. -uploadExtensionErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadExtensionErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``A PHP extension caused the upload to fail.`` @@ -340,8 +340,8 @@ fail. This message has no parameters. -uploadFormSizeErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadFormSizeErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file is too large.`` @@ -350,8 +350,8 @@ by the HTML file input field. This message has no parameters. -uploadIniSizeErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadIniSizeErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.`` @@ -367,8 +367,8 @@ Parameter Description ``{{ suffix }}`` Suffix for the used file size unit (see above) ================ ============================================================= -uploadNoFileErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadNoFileErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``No file was uploaded.`` @@ -376,8 +376,8 @@ The message that is displayed if no file was uploaded. This message has no parameters. -uploadNoTmpDirErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadNoTmpDirErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``No temporary folder was configured in php.ini.`` @@ -386,8 +386,8 @@ missing. This message has no parameters. -uploadPartialErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadPartialErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file was only partially uploaded.`` diff --git a/reference/constraints/Image.rst b/reference/constraints/Image.rst index e8b492bf4ae..8ab714db79b 100644 --- a/reference/constraints/Image.rst +++ b/reference/constraints/Image.rst @@ -230,15 +230,15 @@ This constraint shares all of its options with the :doc:`File `] diff --git a/reference/constraints/Timezone.rst b/reference/constraints/Timezone.rst index c5f27e1cbfb..3725038f0d8 100644 --- a/reference/constraints/Timezone.rst +++ b/reference/constraints/Timezone.rst @@ -86,8 +86,8 @@ string which contains any of the `PHP timezone identifiers`_ (e.g. ``America/New Options ------- -countryCode -~~~~~~~~~~~ +``countryCode`` +~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``null`` @@ -100,8 +100,8 @@ The value of this option must be a valid `ISO 3166-1 alpha-2`_ country code .. include:: /reference/constraints/_groups-option.rst.inc -intlCompatible -~~~~~~~~~~~~~~ +``intlCompatible`` +~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -114,8 +114,8 @@ timezones provided by PHP's Intl extension (because they use different ICU versions). If this option is set to ``true``, this constraint only considers valid the values compatible with the PHP ``\IntlTimeZone::createTimeZone()`` method. -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not a valid timezone.`` @@ -131,8 +131,8 @@ Parameter Description .. include:: /reference/constraints/_payload-option.rst.inc -zone -~~~~ +``zone`` +~~~~~~~~ **type**: ``string`` **default**: ``\DateTimeZone::ALL`` diff --git a/reference/constraints/Type.rst b/reference/constraints/Type.rst index 307b7565749..17ee98fec78 100644 --- a/reference/constraints/Type.rst +++ b/reference/constraints/Type.rst @@ -155,8 +155,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value should be of type {{ type }}.`` @@ -175,8 +175,8 @@ Parameter Description .. _reference-constraint-type-type: -type -~~~~ +``type`` +~~~~~~~~ **type**: ``string`` or ``array`` [:ref:`default option `] diff --git a/reference/constraints/Unique.rst b/reference/constraints/Unique.rst index e6acb08ea71..9d9cc0ffed2 100644 --- a/reference/constraints/Unique.rst +++ b/reference/constraints/Unique.rst @@ -94,8 +94,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This collection should contain only unique elements.`` diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index ca0a0be28c6..f96d6d91b47 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -140,8 +140,8 @@ the uniqueness. If it's left blank, the correct entity manager will be determined for this class. For that reason, this option should probably not need to be used. -entityClass -~~~~~~~~~~~ +``entityClass`` +~~~~~~~~~~~~~~~ **type**: ``string`` @@ -151,8 +151,8 @@ inheritance mapping, you need to execute the query in a different repository. Use this option to define the fully-qualified class name (FQCN) of the Doctrine entity associated with the repository you want to use. -errorPath -~~~~~~~~~ +``errorPath`` +~~~~~~~~~~~~~ **type**: ``string`` **default**: The name of the first field in `fields`_ @@ -249,8 +249,8 @@ Consider this example: Now, the message would be bound to the ``port`` field with this configuration. -fields -~~~~~~ +``fields`` +~~~~~~~~~~ **type**: ``array`` | ``string`` [:ref:`default option `] @@ -266,8 +266,8 @@ each with a single field. .. include:: /reference/constraints/_groups-option.rst.inc -ignoreNull -~~~~~~~~~~ +``ignoreNull`` +~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` @@ -276,8 +276,8 @@ entities to have a ``null`` value for a field without failing validation. If set to ``false``, only one ``null`` value is allowed - if a second entity also has a ``null`` value, validation would fail. -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is already used.`` @@ -300,8 +300,8 @@ Parameter Description .. include:: /reference/constraints/_payload-option.rst.inc -repositoryMethod -~~~~~~~~~~~~~~~~ +``repositoryMethod`` +~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``findBy`` diff --git a/reference/constraints/Url.rst b/reference/constraints/Url.rst index 4c9885d0147..ac230890a9a 100644 --- a/reference/constraints/Url.rst +++ b/reference/constraints/Url.rst @@ -81,8 +81,8 @@ Basic Usage Options ------- -checkDNS -~~~~~~~~ +``checkDNS`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -163,8 +163,8 @@ option to the value of any of the ``CHECK_DNS_TYPE_*`` constants in the This option uses the :phpfunction:`checkdnsrr` PHP function to check the validity of the DNS record corresponding to the host associated with the given URL. -dnsMessage -~~~~~~~~~~ +``dnsMessage`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The host could not be resolved.`` @@ -242,8 +242,8 @@ DNS check failed. .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not a valid URL.`` @@ -324,8 +324,8 @@ Parameter Description .. include:: /reference/constraints/_payload-option.rst.inc -protocols -~~~~~~~~~ +``protocols`` +~~~~~~~~~~~~~ **type**: ``array`` **default**: ``['http', 'https']`` @@ -399,8 +399,8 @@ the ``ftp://`` type URLs to be valid, redefine the ``protocols`` array, listing } } -relativeProtocol -~~~~~~~~~~~~~~~~ +``relativeProtocol`` +~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/constraints/Valid.rst b/reference/constraints/Valid.rst index 1cb992128ac..edd282fa53b 100644 --- a/reference/constraints/Valid.rst +++ b/reference/constraints/Valid.rst @@ -250,8 +250,8 @@ Options .. include:: /reference/constraints/_payload-option.rst.inc -traverse -~~~~~~~~ +``traverse`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` diff --git a/reference/constraints/_normalizer-option.rst.inc b/reference/constraints/_normalizer-option.rst.inc index 784f915ff95..dcbba1c2da8 100644 --- a/reference/constraints/_normalizer-option.rst.inc +++ b/reference/constraints/_normalizer-option.rst.inc @@ -1,5 +1,5 @@ -normalizer -~~~~~~~~~~ +``normalizer`` +~~~~~~~~~~~~~~ **type**: a `PHP callable`_ **default**: ``null``