From a33471b10cf8afaaa0797fd150b02e6c9638d6d6 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 7 Mar 2019 15:18:56 +0100 Subject: [PATCH 1/3] Switch to simple tables and sorted option names --- reference/constraints/All.rst | 19 +++--- reference/constraints/Bic.rst | 25 ++++---- reference/constraints/Blank.rst | 19 +++--- reference/constraints/Callback.rst | 19 +++--- reference/constraints/CardScheme.rst | 21 +++---- reference/constraints/Choice.rst | 35 +++++------ reference/constraints/Collection.rst | 27 ++++----- reference/constraints/Count.rst | 27 ++++----- reference/constraints/Country.rst | 19 +++--- reference/constraints/Currency.rst | 19 +++--- reference/constraints/Date.rst | 19 +++--- reference/constraints/DateTime.rst | 21 +++---- reference/constraints/DivisibleBy.rst | 21 +++---- reference/constraints/Email.rst | 25 ++++---- reference/constraints/EqualTo.rst | 23 ++++--- reference/constraints/Expression.rst | 24 ++++---- reference/constraints/File.rst | 49 +++++++-------- reference/constraints/GreaterThan.rst | 23 ++++--- reference/constraints/GreaterThanOrEqual.rst | 23 ++++--- reference/constraints/Iban.rst | 19 +++--- reference/constraints/IdenticalTo.rst | 23 ++++--- reference/constraints/Image.rst | 63 ++++++++++---------- reference/constraints/Ip.rst | 21 +++---- reference/constraints/IsFalse.rst | 19 +++--- reference/constraints/IsNull.rst | 19 +++--- reference/constraints/IsTrue.rst | 19 +++--- reference/constraints/Isbn.rst | 27 ++++----- reference/constraints/Issn.rst | 23 ++++--- reference/constraints/Language.rst | 19 +++--- reference/constraints/Length.rst | 31 +++++----- reference/constraints/LessThan.rst | 23 ++++--- reference/constraints/LessThanOrEqual.rst | 23 ++++--- reference/constraints/Locale.rst | 21 +++---- reference/constraints/Luhn.rst | 19 +++--- reference/constraints/NotBlank.rst | 19 +++--- reference/constraints/NotEqualTo.rst | 23 ++++--- reference/constraints/NotIdenticalTo.rst | 23 ++++--- reference/constraints/NotNull.rst | 19 +++--- reference/constraints/Range.rst | 27 ++++----- reference/constraints/Regex.rst | 25 ++++---- reference/constraints/Time.rst | 19 +++--- reference/constraints/Type.rst | 21 +++---- reference/constraints/UniqueEntity.rst | 31 +++++----- reference/constraints/Url.rst | 27 ++++----- reference/constraints/UserPassword.rst | 19 +++--- reference/constraints/Uuid.rst | 23 ++++--- reference/constraints/Valid.rst | 16 +++-- 47 files changed, 490 insertions(+), 629 deletions(-) diff --git a/reference/constraints/All.rst b/reference/constraints/All.rst index 5cdd5f9d45b..48dddc39f32 100644 --- a/reference/constraints/All.rst +++ b/reference/constraints/All.rst @@ -4,17 +4,14 @@ All When applied to an array (or Traversable object), this constraint allows you to apply a collection of constraints to each element of the array. -+----------------+-------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+-------------------------------------------------------------------+ -| Options | - `constraints`_ | -| | - `groups`_ | -| | - `payload`_ | -+----------------+-------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\All` | -+----------------+-------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\AllValidator` | -+----------------+-------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `constraints`_ + - `groups`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\All` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\AllValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Bic.rst b/reference/constraints/Bic.rst index 1a30dbf50cf..42f9614ea9a 100644 --- a/reference/constraints/Bic.rst +++ b/reference/constraints/Bic.rst @@ -6,20 +6,17 @@ This constraint is used to ensure that a value has the proper format of a uniquely identify both financial and non-financial institutions. You may also check that the BIC is associated with a given IBAN. -+----------------+-----------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+-----------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -| | - `iban`_ | -| | - `ibanMessage`_ | -| | - `ibanPropertyPath`_ | -+----------------+-----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Bic` | -+----------------+-----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\BicValidator` | -+----------------+-----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - `iban`_ + - `ibanMessage`_ + - `ibanPropertyPath`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Bic` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\BicValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Blank.rst b/reference/constraints/Blank.rst index 596c2a11a7c..d8c99ccea2f 100644 --- a/reference/constraints/Blank.rst +++ b/reference/constraints/Blank.rst @@ -13,17 +13,14 @@ To force that a value strictly be equal to ``null``, see the To force that a value is *not* blank, see :doc:`/reference/constraints/NotBlank`. But be careful as ``NotBlank`` is *not* strictly the opposite of ``Blank``. -+----------------+---------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+---------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+---------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Blank` | -+----------------+---------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\BlankValidator` | -+----------------+---------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Blank` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\BlankValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Callback.rst b/reference/constraints/Callback.rst index cd31b4ed572..c53a7c957e5 100644 --- a/reference/constraints/Callback.rst +++ b/reference/constraints/Callback.rst @@ -17,17 +17,14 @@ can do anything, including creating and assigning validation errors. as you'll see in the example, a callback method has the ability to directly add validator "violations". -+----------------+------------------------------------------------------------------------+ -| Applies to | :ref:`class ` | -+----------------+------------------------------------------------------------------------+ -| Options | - :ref:`callback ` | -| | - `groups`_ | -| | - `payload`_ | -+----------------+------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Callback` | -+----------------+------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CallbackValidator` | -+----------------+------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`class ` +Options - :ref:`callback ` + - `groups`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Callback` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\CallbackValidator` +========== =================================================================== Configuration ------------- diff --git a/reference/constraints/CardScheme.rst b/reference/constraints/CardScheme.rst index d8225e8f6ae..a444af9b389 100644 --- a/reference/constraints/CardScheme.rst +++ b/reference/constraints/CardScheme.rst @@ -5,18 +5,15 @@ This constraint ensures that a credit card number is valid for a given credit card company. It can be used to validate the number before trying to initiate a payment through a payment gateway. -+----------------+--------------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+--------------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `schemes`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+--------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\CardScheme` | -+----------------+--------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CardSchemeValidator` | -+----------------+--------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - `schemes`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\CardScheme` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\CardSchemeValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Choice.rst b/reference/constraints/Choice.rst index 2aab9751b60..8b3a03d5341 100644 --- a/reference/constraints/Choice.rst +++ b/reference/constraints/Choice.rst @@ -5,25 +5,22 @@ This constraint is used to ensure that the given value is one of a given set of *valid* choices. It can also be used to validate that each item in an array of items is one of those valid choices. -+----------------+----------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+----------------------------------------------------------------------+ -| Options | - `choices`_ | -| | - `callback`_ | -| | - `groups`_ | -| | - `multiple`_ | -| | - `min`_ | -| | - `max`_ | -| | - `message`_ | -| | - `multipleMessage`_ | -| | - `minMessage`_ | -| | - `maxMessage`_ | -| | - `payload`_ | -+----------------+----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Choice` | -+----------------+----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\ChoiceValidator` | -+----------------+----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `callback`_ + - `choices`_ + - `groups`_ + - `max`_ + - `maxMessage`_ + - `message`_ + - `min`_ + - `minMessage`_ + - `multiple`_ + - `multipleMessage`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Choice` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\ChoiceValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Collection.rst b/reference/constraints/Collection.rst index 67bb325d5c5..b01a12dad02 100644 --- a/reference/constraints/Collection.rst +++ b/reference/constraints/Collection.rst @@ -11,21 +11,18 @@ constraint. This constraint can also make sure that certain collection keys are present and that extra keys are not present. -+----------------+--------------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+--------------------------------------------------------------------------+ -| Options | - `allowExtraFields`_ | -| | - `allowMissingFields`_ | -| | - `extraFieldsMessage`_ | -| | - `fields`_ | -| | - `groups`_ | -| | - `missingFieldsMessage`_ | -| | - `payload`_ | -+----------------+--------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Collection` | -+----------------+--------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CollectionValidator` | -+----------------+--------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `allowExtraFields`_ + - `allowMissingFields`_ + - `extraFieldsMessage`_ + - `fields`_ + - `groups`_ + - `missingFieldsMessage`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Collection` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\CollectionValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Count.rst b/reference/constraints/Count.rst index c7aae41ce6a..511a509fa86 100644 --- a/reference/constraints/Count.rst +++ b/reference/constraints/Count.rst @@ -4,21 +4,18 @@ Count Validates that a given collection's (i.e. an array or an object that implements Countable) element count is *between* some minimum and maximum value. -+----------------+---------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+---------------------------------------------------------------------+ -| Options | - `min`_ | -| | - `max`_ | -| | - `minMessage`_ | -| | - `maxMessage`_ | -| | - `exactMessage`_ | -| | - `payload`_ | -| | - `groups`_ | -+----------------+---------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Count` | -+----------------+---------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CountValidator` | -+----------------+---------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `exactMessage`_ + - `groups`_ + - `max`_ + - `maxMessage`_ + - `min`_ + - `minMessage`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Count` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\CountValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Country.rst b/reference/constraints/Country.rst index e8089671438..ab801b785ab 100644 --- a/reference/constraints/Country.rst +++ b/reference/constraints/Country.rst @@ -3,17 +3,14 @@ Country Validates that a value is a valid `ISO 3166-1 alpha-2`_ country code. -+----------------+------------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+------------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Country` | -+----------------+------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CountryValidator` | -+----------------+------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Country` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\CountryValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Currency.rst b/reference/constraints/Currency.rst index 1186806808d..15063da2a24 100644 --- a/reference/constraints/Currency.rst +++ b/reference/constraints/Currency.rst @@ -3,17 +3,14 @@ Currency Validates that a value is a valid `3-letter ISO 4217`_ currency name. -+----------------+---------------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+---------------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+---------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Currency` | -+----------------+---------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CurrencyValidator` | -+----------------+---------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Currency` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\CurrencyValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Date.rst b/reference/constraints/Date.rst index c9c9c4941d1..52e22d8953c 100644 --- a/reference/constraints/Date.rst +++ b/reference/constraints/Date.rst @@ -4,17 +4,14 @@ Date Validates that a value is a valid date, meaning a string (or an object that can be cast into a string) that follows a valid ``YYYY-MM-DD`` format. -+----------------+--------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+--------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+--------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Date` | -+----------------+--------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\DateValidator` | -+----------------+--------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Date` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\DateValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/DateTime.rst b/reference/constraints/DateTime.rst index fc26179b8ab..1a258f9802e 100644 --- a/reference/constraints/DateTime.rst +++ b/reference/constraints/DateTime.rst @@ -4,18 +4,15 @@ DateTime Validates that a value is a valid "datetime", meaning a string (or an object that can be cast into a string) that follows a specific format. -+----------------+------------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+------------------------------------------------------------------------+ -| Options | - `format`_ | -| | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\DateTime` | -+----------------+------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\DateTimeValidator` | -+----------------+------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `format`_ + - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\DateTime` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\DateTimeValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/DivisibleBy.rst b/reference/constraints/DivisibleBy.rst index b45902bd5be..8d7a57cd502 100644 --- a/reference/constraints/DivisibleBy.rst +++ b/reference/constraints/DivisibleBy.rst @@ -3,18 +3,15 @@ DivisibleBy Validates that a value is divisible by another value, defined in the options. -+----------------+---------------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+---------------------------------------------------------------------------+ -| Options | - `value`_ | -| | - `message`_ | -| | - `payload`_ | -| | - `propertyPath`_ | -+----------------+---------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\DivisibleBy` | -+----------------+---------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\DivisibleByValidator` | -+----------------+---------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `message`_ + - `payload`_ + - `propertyPath`_ + - `value`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\DivisibleBy` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\DivisibleByValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Email.rst b/reference/constraints/Email.rst index 17b3375c5b6..d0cac7016fc 100644 --- a/reference/constraints/Email.rst +++ b/reference/constraints/Email.rst @@ -4,20 +4,17 @@ Email Validates that a value is a valid email address. The underlying value is cast to a string before being validated. -+----------------+---------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+---------------------------------------------------------------------+ -| Options | - `mode`_ | -| | - `message`_ | -| | - `checkMX`_ | -| | - `checkHost`_ | -| | - `payload`_ | -| | - `groups`_ | -+----------------+---------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Email` | -+----------------+---------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\EmailValidator` | -+----------------+---------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `checkHost`_ + - `checkMX`_ + - `groups`_ + - `message`_ + - `mode`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Email` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\EmailValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/EqualTo.rst b/reference/constraints/EqualTo.rst index 690eb33920c..72fe3210b1b 100644 --- a/reference/constraints/EqualTo.rst +++ b/reference/constraints/EqualTo.rst @@ -10,19 +10,16 @@ To force that a value is *not* equal, see :doc:`/reference/constraints/NotEqualT equal. Use :doc:`/reference/constraints/IdenticalTo` to compare with ``===``. -+----------------+-----------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+-----------------------------------------------------------------------+ -| Options | - `value`_ | -| | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -| | - `propertyPath`_ | -+----------------+-----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\EqualTo` | -+----------------+-----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\EqualToValidator` | -+----------------+-----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - `propertyPath`_ + - `value`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\EqualTo` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\EqualToValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Expression.rst b/reference/constraints/Expression.rst index 5e0f7c61ed9..c18cdc6335c 100644 --- a/reference/constraints/Expression.rst +++ b/reference/constraints/Expression.rst @@ -6,19 +6,17 @@ for more complex, dynamic validation. See `Basic Usage`_ for an example. See :doc:`/reference/constraints/Callback` for a different constraint that gives you similar flexibility. -+----------------+-----------------------------------------------------------------------------------------------+ -| Applies to | :ref:`class ` or :ref:`property/method ` | -+----------------+-----------------------------------------------------------------------------------------------+ -| Options | - :ref:`expression ` | -| | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -| | - `values`_ | -+----------------+-----------------------------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Expression` | -+----------------+-----------------------------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\ExpressionValidator` | -+----------------+-----------------------------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`class ` + or :ref:`property/method ` +Options - :ref:`expression ` + - `groups`_ + - `message`_ + - `payload`_ + - `values`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Expression` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\ExpressionValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/File.rst b/reference/constraints/File.rst index 437e90d8f1a..6abcca7880d 100644 --- a/reference/constraints/File.rst +++ b/reference/constraints/File.rst @@ -16,32 +16,29 @@ form field. If the file you're validating is an image, try the :doc:`Image ` constraint. -+----------------+---------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+---------------------------------------------------------------------+ -| Options | - `maxSize`_ | -| | - `binaryFormat`_ | -| | - `mimeTypes`_ | -| | - `maxSizeMessage`_ | -| | - `mimeTypesMessage`_ | -| | - `disallowEmptyMessage`_ | -| | - `notFoundMessage`_ | -| | - `notReadableMessage`_ | -| | - `uploadIniSizeErrorMessage`_ | -| | - `uploadFormSizeErrorMessage`_ | -| | - `uploadPartialErrorMessage`_ | -| | - `uploadNoFileErrorMessage`_ | -| | - `uploadNoTmpDirErrorMessage`_ | -| | - `uploadCantWriteErrorMessage`_ | -| | - `uploadExtensionErrorMessage`_ | -| | - `uploadErrorMessage`_ | -| | - `payload`_ | -| | - `groups`_ | -+----------------+---------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\File` | -+----------------+---------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\FileValidator` | -+----------------+---------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `binaryFormat`_ + - `disallowEmptyMessage`_ + - `groups`_ + - `maxSize`_ + - `maxSizeMessage`_ + - `mimeTypes`_ + - `mimeTypesMessage`_ + - `notFoundMessage`_ + - `notReadableMessage`_ + - `payload`_ + - `uploadCantWriteErrorMessage`_ + - `uploadErrorMessage`_ + - `uploadExtensionErrorMessage`_ + - `uploadFormSizeErrorMessage`_ + - `uploadIniSizeErrorMessage`_ + - `uploadNoFileErrorMessage`_ + - `uploadNoTmpDirErrorMessage`_ + - `uploadPartialErrorMessage`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\File` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\FileValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/GreaterThan.rst b/reference/constraints/GreaterThan.rst index 656c86a49d8..1c4578b8a92 100644 --- a/reference/constraints/GreaterThan.rst +++ b/reference/constraints/GreaterThan.rst @@ -6,19 +6,16 @@ force that a value is greater than or equal to another value, see :doc:`/reference/constraints/GreaterThanOrEqual`. To force a value is less than another value, see :doc:`/reference/constraints/LessThan`. -+----------------+---------------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+---------------------------------------------------------------------------+ -| Options | - `value`_ | -| | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -| | - `propertyPath`_ | -+----------------+---------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThan` | -+----------------+---------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanValidator` | -+----------------+---------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - `propertyPath`_ + - `value`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThan` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/GreaterThanOrEqual.rst b/reference/constraints/GreaterThanOrEqual.rst index 3e80e49a9df..e02c75876c7 100644 --- a/reference/constraints/GreaterThanOrEqual.rst +++ b/reference/constraints/GreaterThanOrEqual.rst @@ -5,19 +5,16 @@ Validates that a value is greater than or equal to another value, defined in the options. To force that a value is greater than another value, see :doc:`/reference/constraints/GreaterThan`. -+----------------+----------------------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+----------------------------------------------------------------------------------+ -| Options | - `value`_ | -| | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -| | - `propertyPath`_ | -+----------------+----------------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqual` | -+----------------+----------------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqualValidator` | -+----------------+----------------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - `propertyPath`_ + - `value`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqual` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqualValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Iban.rst b/reference/constraints/Iban.rst index 0029a302d52..0210c0c2f79 100644 --- a/reference/constraints/Iban.rst +++ b/reference/constraints/Iban.rst @@ -6,17 +6,14 @@ format of an `International Bank Account Number (IBAN)`_. IBAN is an internationally agreed means of identifying bank accounts across national borders with a reduced risk of propagating transcription errors. -+----------------+-----------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+-----------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+-----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Iban` | -+----------------+-----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\IbanValidator` | -+----------------+-----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Iban` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\IbanValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/IdenticalTo.rst b/reference/constraints/IdenticalTo.rst index ab12ddbfd11..7ae15984e2a 100644 --- a/reference/constraints/IdenticalTo.rst +++ b/reference/constraints/IdenticalTo.rst @@ -11,19 +11,16 @@ To force that a value is *not* identical, see considered equal. Use :doc:`/reference/constraints/EqualTo` to compare with ``==``. -+----------------+--------------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+--------------------------------------------------------------------------+ -| Options | - `value`_ | -| | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -| | - `propertyPath`_ | -+----------------+--------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\IdenticalTo` | -+----------------+--------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\IdenticalToValidator`| -+----------------+--------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - `propertyPath`_ + - `value`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\IdenticalTo` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\IdenticalToValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Image.rst b/reference/constraints/Image.rst index 63a14431f4c..8e777758c23 100644 --- a/reference/constraints/Image.rst +++ b/reference/constraints/Image.rst @@ -11,39 +11,36 @@ of the image. See the :doc:`File ` constraint for the bulk of the documentation on this constraint. -+----------------+-----------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+-----------------------------------------------------------------------+ -| Options | - `mimeTypes`_ | -| | - `minWidth`_ | -| | - `maxWidth`_ | -| | - `maxHeight`_ | -| | - `minHeight`_ | -| | - `maxRatio`_ | -| | - `minRatio`_ | -| | - `allowSquare`_ | -| | - `allowLandscape`_ | -| | - `allowPortrait`_ | -| | - `detectCorrupted`_ | -| | - `mimeTypesMessage`_ | -| | - `sizeNotDetectedMessage`_ | -| | - `maxWidthMessage`_ | -| | - `minWidthMessage`_ | -| | - `maxHeightMessage`_ | -| | - `minHeightMessage`_ | -| | - `maxRatioMessage`_ | -| | - `minRatioMessage`_ | -| | - `allowSquareMessage`_ | -| | - `allowLandscapeMessage`_ | -| | - `allowPortraitMessage`_ | -| | - `corruptedMessage`_ | -| | - See :doc:`File ` for inherited options | -| | - `groups`_ | -+----------------+-----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Image` | -+----------------+-----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\ImageValidator` | -+----------------+-----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `allowLandscape`_ + - `allowLandscapeMessage`_ + - `allowPortrait`_ + - `allowPortraitMessage`_ + - `allowSquare`_ + - `allowSquareMessage`_ + - `corruptedMessage`_ + - `detectCorrupted`_ + - `groups`_ + - `maxHeight`_ + - `maxHeightMessage`_ + - `maxRatio`_ + - `maxRatioMessage`_ + - `maxWidth`_ + - `maxWidthMessage`_ + - `mimeTypes`_ + - `mimeTypesMessage`_ + - `minHeight`_ + - `minHeightMessage`_ + - `minRatio`_ + - `minRatioMessage`_ + - `minWidth`_ + - `minWidthMessage`_ + - `sizeNotDetectedMessage`_ + - See :doc:`File ` for inherited options +Class :class:`Symfony\\Component\\Validator\\Constraints\\Image` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\ImageValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Ip.rst b/reference/constraints/Ip.rst index 1c62449c5ad..88a21da7bfc 100644 --- a/reference/constraints/Ip.rst +++ b/reference/constraints/Ip.rst @@ -5,18 +5,15 @@ Validates that a value is a valid IP address. By default, this will validate the value as IPv4, but a number of different options exist to validate as IPv6 and many other combinations. -+----------------+---------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+---------------------------------------------------------------------+ -| Options | - `version`_ | -| | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+---------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Ip` | -+----------------+---------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\IpValidator` | -+----------------+---------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - `version`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Ip` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\IpValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/IsFalse.rst b/reference/constraints/IsFalse.rst index 67fa3074e37..05142eb773d 100644 --- a/reference/constraints/IsFalse.rst +++ b/reference/constraints/IsFalse.rst @@ -7,17 +7,14 @@ string "``0``". Also see :doc:`IsTrue `. -+----------------+-----------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+-----------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+-----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\IsFalse` | -+----------------+-----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\IsFalseValidator` | -+----------------+-----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\IsFalse` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\IsFalseValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/IsNull.rst b/reference/constraints/IsNull.rst index 1f274f76215..0a201a2db0c 100644 --- a/reference/constraints/IsNull.rst +++ b/reference/constraints/IsNull.rst @@ -7,17 +7,14 @@ constraint. To ensure that a property is not null, see :doc:`/reference/constrai Also see :doc:`NotNull `. -+----------------+-----------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+-----------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+-----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\IsNull` | -+----------------+-----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\IsNullValidator` | -+----------------+-----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\IsNull` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\IsNullValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/IsTrue.rst b/reference/constraints/IsTrue.rst index b03750b1db6..8203498f9ad 100644 --- a/reference/constraints/IsTrue.rst +++ b/reference/constraints/IsTrue.rst @@ -7,17 +7,14 @@ string "``1``". Also see :doc:`IsFalse `. -+----------------+---------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+---------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+---------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\IsTrue` | -+----------------+---------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\IsTrueValidator`| -+----------------+---------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\IsTrue` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\IsTrueValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Isbn.rst b/reference/constraints/Isbn.rst index faf91960646..a2f84140002 100644 --- a/reference/constraints/Isbn.rst +++ b/reference/constraints/Isbn.rst @@ -4,21 +4,18 @@ Isbn This constraint validates that an `International Standard Book Number (ISBN)`_ is either a valid ISBN-10 or a valid ISBN-13. -+----------------+----------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+----------------------------------------------------------------------+ -| Options | - `type`_ | -| | - `groups`_ | -| | - `message`_ | -| | - `isbn10Message`_ | -| | - `isbn13Message`_ | -| | - `bothIsbnMessage`_ | -| | - `payload`_ | -+----------------+----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Isbn` | -+----------------+----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\IsbnValidator` | -+----------------+----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `bothIsbnMessage`_ + - `groups`_ + - `isbn10Message`_ + - `isbn13Message`_ + - `message`_ + - `payload`_ + - `type`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Isbn` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\IsbnValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Issn.rst b/reference/constraints/Issn.rst index 21afa60ae42..09282cd5cea 100644 --- a/reference/constraints/Issn.rst +++ b/reference/constraints/Issn.rst @@ -4,19 +4,16 @@ Issn Validates that a value is a valid `International Standard Serial Number (ISSN)`_. -+----------------+-----------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+-----------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `caseSensitive`_ | -| | - `requireHyphen`_ | -| | - `payload`_ | -+----------------+-----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Issn` | -+----------------+-----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\IssnValidator` | -+----------------+-----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `caseSensitive`_ + - `groups`_ + - `message`_ + - `payload`_ + - `requireHyphen`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Issn` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\IssnValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Language.rst b/reference/constraints/Language.rst index f330ab427b0..922e7ec01eb 100644 --- a/reference/constraints/Language.rst +++ b/reference/constraints/Language.rst @@ -4,17 +4,14 @@ Language Validates that a value is a valid language *Unicode language identifier* (e.g. ``fr`` or ``zh-Hant``). -+----------------+------------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+------------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Language` | -+----------------+------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\LanguageValidator` | -+----------------+------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Language` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\LanguageValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Length.rst b/reference/constraints/Length.rst index 8242a8de957..beef661ea17 100644 --- a/reference/constraints/Length.rst +++ b/reference/constraints/Length.rst @@ -9,23 +9,20 @@ Validates that a given string length is *between* some minimum and maximum value also add the :doc:`/reference/constraints/NotBlank` or :doc:`/reference/constraints/NotNull` constraints to validate against these. -+----------------+----------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+----------------------------------------------------------------------+ -| Options | - `min`_ | -| | - `max`_ | -| | - `charset`_ | -| | - `minMessage`_ | -| | - `maxMessage`_ | -| | - `exactMessage`_ | -| | - `charsetMessage`_ | -| | - `payload`_ | -| | - `groups`_ | -+----------------+----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Length` | -+----------------+----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\LengthValidator` | -+----------------+----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `charset`_ + - `charsetMessage`_ + - `exactMessage`_ + - `groups`_ + - `max`_ + - `maxMessage`_ + - `min`_ + - `minMessage`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Length` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\LengthValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/LessThan.rst b/reference/constraints/LessThan.rst index 5f93bc77029..d101233d1d5 100644 --- a/reference/constraints/LessThan.rst +++ b/reference/constraints/LessThan.rst @@ -6,19 +6,16 @@ force that a value is less than or equal to another value, see :doc:`/reference/constraints/LessThanOrEqual`. To force a value is greater than another value, see :doc:`/reference/constraints/GreaterThan`. -+----------------+------------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+------------------------------------------------------------------------+ -| Options | - `value`_ | -| | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -| | - `propertyPath`_ | -+----------------+------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\LessThan` | -+----------------+------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\LessThanValidator` | -+----------------+------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - `propertyPath`_ + - `value`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\LessThan` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\LessThanValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/LessThanOrEqual.rst b/reference/constraints/LessThanOrEqual.rst index 4ac07c42b18..b21734d5126 100644 --- a/reference/constraints/LessThanOrEqual.rst +++ b/reference/constraints/LessThanOrEqual.rst @@ -5,19 +5,16 @@ Validates that a value is less than or equal to another value, defined in the options. To force that a value is less than another value, see :doc:`/reference/constraints/LessThan`. -+----------------+-------------------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+-------------------------------------------------------------------------------+ -| Options | - `value`_ | -| | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -| | - `propertyPath`_ | -+----------------+-------------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\LessThanOrEqual` | -+----------------+-------------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\LessThanOrEqualValidator` | -+----------------+-------------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - `propertyPath`_ + - `value`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\LessThanOrEqual` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\LessThanOrEqualValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Locale.rst b/reference/constraints/Locale.rst index e27b23a6d8d..6d67edab9c8 100644 --- a/reference/constraints/Locale.rst +++ b/reference/constraints/Locale.rst @@ -8,18 +8,15 @@ the two letter `ISO 639-1`_ *language* code (e.g. ``fr``), or the language code followed by an underscore (``_``) and the `ISO 3166-1 alpha-2`_ *country* code (e.g. ``fr_FR`` for French/France). -+----------------+------------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+------------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -| | - `canonicalize`_ | -+----------------+------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Locale` | -+----------------+------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\LocaleValidator` | -+----------------+------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `canonicalize`_ + - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Locale` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\LocaleValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Luhn.rst b/reference/constraints/Luhn.rst index 071d5647e00..911a788db56 100644 --- a/reference/constraints/Luhn.rst +++ b/reference/constraints/Luhn.rst @@ -5,17 +5,14 @@ This constraint is used to ensure that a credit card number passes the `Luhn algorithm`_. It is useful as a first step to validating a credit card: before communicating with a payment gateway. -+----------------+-----------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+-----------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+-----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Luhn` | -+----------------+-----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\LuhnValidator` | -+----------------+-----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Luhn` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\LuhnValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/NotBlank.rst b/reference/constraints/NotBlank.rst index 44ea6d01008..1e8304a53c0 100644 --- a/reference/constraints/NotBlank.rst +++ b/reference/constraints/NotBlank.rst @@ -5,17 +5,14 @@ Validates that a value is not blank - meaning not equal to a blank string, a blank array, ``false`` or ``null``. To check that a value is not equal to ``null``, see the :doc:`/reference/constraints/NotNull` constraint. -+----------------+------------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+------------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\NotBlank` | -+----------------+------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\NotBlankValidator` | -+----------------+------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\NotBlank` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\NotBlankValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/NotEqualTo.rst b/reference/constraints/NotEqualTo.rst index 7b6e31f8234..b737ec3641f 100644 --- a/reference/constraints/NotEqualTo.rst +++ b/reference/constraints/NotEqualTo.rst @@ -11,19 +11,16 @@ options. To force that a value is equal, see equal. Use :doc:`/reference/constraints/NotIdenticalTo` to compare with ``!==``. -+----------------+-------------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+-------------------------------------------------------------------------+ -| Options | - `value`_ | -| | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -| | - `propertyPath`_ | -+----------------+-------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\NotEqualTo` | -+----------------+-------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\NotEqualToValidator`| -+----------------+-------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - `propertyPath`_ + - `value`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\NotEqualTo` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\NotEqualToValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/NotIdenticalTo.rst b/reference/constraints/NotIdenticalTo.rst index def6ea333bc..ca299fe79bf 100644 --- a/reference/constraints/NotIdenticalTo.rst +++ b/reference/constraints/NotIdenticalTo.rst @@ -11,19 +11,16 @@ the options. To force that a value is identical, see considered not equal. Use :doc:`/reference/constraints/NotEqualTo` to compare with ``!=``. -+----------------+-----------------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+-----------------------------------------------------------------------------+ -| Options | - `value`_ | -| | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -| | - `propertyPath`_ | -+----------------+-----------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\NotIdenticalTo` | -+----------------+-----------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\NotIdenticalToValidator`| -+----------------+-----------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - `propertyPath`_ + - `value`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\NotIdenticalTo` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\NotIdenticalToValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/NotNull.rst b/reference/constraints/NotNull.rst index 716547b8aa5..56db0528567 100644 --- a/reference/constraints/NotNull.rst +++ b/reference/constraints/NotNull.rst @@ -5,17 +5,14 @@ Validates that a value is not strictly equal to ``null``. To ensure that a value is not blank (not a blank string), see the :doc:`/reference/constraints/NotBlank` constraint. -+----------------+-----------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+-----------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+-----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\NotNull` | -+----------------+-----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\NotNullValidator` | -+----------------+-----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\NotNull` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\NotNullValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Range.rst b/reference/constraints/Range.rst index 8c1e377c541..c3818f621b1 100644 --- a/reference/constraints/Range.rst +++ b/reference/constraints/Range.rst @@ -3,21 +3,18 @@ Range Validates that a given number or ``DateTime`` object is *between* some minimum and maximum. -+----------------+---------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+---------------------------------------------------------------------+ -| Options | - `min`_ | -| | - `max`_ | -| | - `minMessage`_ | -| | - `maxMessage`_ | -| | - `invalidMessage`_ | -| | - `payload`_ | -| | - `groups`_ | -+----------------+---------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Range` | -+----------------+---------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\RangeValidator` | -+----------------+---------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `invalidMessage`_ + - `max`_ + - `maxMessage`_ + - `min`_ + - `minMessage`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Range` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\RangeValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Regex.rst b/reference/constraints/Regex.rst index 31c506b11a8..fcc84fbf2f8 100644 --- a/reference/constraints/Regex.rst +++ b/reference/constraints/Regex.rst @@ -3,20 +3,17 @@ Regex Validates that a value matches a regular expression. -+----------------+-----------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+-----------------------------------------------------------------------+ -| Options | - `pattern`_ | -| | - `groups`_ | -| | - `htmlPattern`_ | -| | - `match`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+-----------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Regex` | -+----------------+-----------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\RegexValidator` | -+----------------+-----------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `htmlPattern`_ + - `match`_ + - `message`_ + - `pattern`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Regex` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\RegexValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Time.rst b/reference/constraints/Time.rst index 24b128ec973..69cf262ce93 100644 --- a/reference/constraints/Time.rst +++ b/reference/constraints/Time.rst @@ -4,17 +4,14 @@ Time Validates that a value is a valid time, meaning a string (or an object that can be cast into a string) that follows a valid ``HH:MM:SS`` format. -+----------------+------------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+------------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Time` | -+----------------+------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\TimeValidator` | -+----------------+------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Time` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\TimeValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Type.rst b/reference/constraints/Type.rst index 29e66a9bced..4bdd19f6189 100644 --- a/reference/constraints/Type.rst +++ b/reference/constraints/Type.rst @@ -5,18 +5,15 @@ Validates that a value is of a specific data type. For example, if a variable should be an array, you can use this constraint with the ``array`` type option to validate this. -+----------------+---------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+---------------------------------------------------------------------+ -| Options | - :ref:`type ` | -| | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+---------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Type` | -+----------------+---------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\TypeValidator` | -+----------------+---------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - :ref:`type ` +Class :class:`Symfony\\Component\\Validator\\Constraints\\Type` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\TypeValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index 6002261e2d3..6c3b59f8cbc 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -5,23 +5,20 @@ Validates that a particular field (or fields) in a Doctrine entity is (are) unique. This is commonly used, for example, to prevent a new user to register using an email address that already exists in the system. -+----------------+-------------------------------------------------------------------------------------+ -| Applies to | :ref:`class ` | -+----------------+-------------------------------------------------------------------------------------+ -| Options | - `fields`_ | -| | - `groups`_ | -| | - `message`_ | -| | - `em`_ | -| | - `repositoryMethod`_ | -| | - `entityClass`_ | -| | - `errorPath`_ | -| | - `ignoreNull`_ | -| | - `payload`_ | -+----------------+-------------------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Bridge\\Doctrine\\Validator\\Constraints\\UniqueEntity` | -+----------------+-------------------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Bridge\\Doctrine\\Validator\\Constraints\\UniqueEntityValidator` | -+----------------+-------------------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`class ` +Options - `em`_ + - `entityClass`_ + - `errorPath`_ + - `fields`_ + - `groups`_ + - `ignoreNull`_ + - `message`_ + - `payload`_ + - `repositoryMethod`_ +Class :class:`Symfony\\Bridge\\Doctrine\\Validator\\Constraints\\UniqueEntity` +Validator :class:`Symfony\\Bridge\\Doctrine\\Validator\\Constraints\\UniqueEntityValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Url.rst b/reference/constraints/Url.rst index 01d2339dd30..41a13db6a8e 100644 --- a/reference/constraints/Url.rst +++ b/reference/constraints/Url.rst @@ -3,21 +3,18 @@ Url Validates that a value is a valid URL string. -+----------------+---------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+---------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `protocols`_ | -| | - `payload`_ | -| | - `checkDNS`_ | -| | - `dnsMessage`_ | -| | - `relativeProtocol`_ | -+----------------+---------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Url` | -+----------------+---------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\UrlValidator` | -+----------------+---------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `checkDNS`_ + - `dnsMessage`_ + - `groups`_ + - `message`_ + - `payload`_ + - `protocols`_ + - `relativeProtocol`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Url` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\UrlValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/UserPassword.rst b/reference/constraints/UserPassword.rst index c1f7e88a304..6cc554d7457 100644 --- a/reference/constraints/UserPassword.rst +++ b/reference/constraints/UserPassword.rst @@ -10,17 +10,14 @@ password, but needs to enter their old password for security. This should **not** be used to validate a login form, since this is done automatically by the security system. -+----------------+--------------------------------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+--------------------------------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `payload`_ | -+----------------+--------------------------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPassword` | -+----------------+--------------------------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPasswordValidator` | -+----------------+--------------------------------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ +Class :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPassword` +Validator :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPasswordValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Uuid.rst b/reference/constraints/Uuid.rst index c8e36d2105f..8d253f7c616 100644 --- a/reference/constraints/Uuid.rst +++ b/reference/constraints/Uuid.rst @@ -6,19 +6,16 @@ By default, this will validate the format according to the RFC's guidelines, but be relaxed to accept non-standard UUIDs that other systems (like PostgreSQL) accept. UUID versions can also be restricted using a whitelist. -+----------------+---------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+---------------------------------------------------------------------+ -| Options | - `groups`_ | -| | - `message`_ | -| | - `strict`_ | -| | - `versions`_ | -| | - `payload`_ | -+----------------+---------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Uuid` | -+----------------+---------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\UuidValidator` | -+----------------+---------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `message`_ + - `payload`_ + - `strict`_ + - `versions`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Uuid` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\UuidValidator` +========== =================================================================== Basic Usage ----------- diff --git a/reference/constraints/Valid.rst b/reference/constraints/Valid.rst index a80e63dc4b8..280ae28579f 100644 --- a/reference/constraints/Valid.rst +++ b/reference/constraints/Valid.rst @@ -5,15 +5,13 @@ This constraint is used to enable validation on objects that are embedded as properties on an object being validated. This allows you to validate an object and all sub-objects associated with it. -+----------------+---------------------------------------------------------------------+ -| Applies to | :ref:`property or method ` | -+----------------+---------------------------------------------------------------------+ -| Options | - `traverse`_ | -| | - `payload`_ | -| | - `groups`_ | -+----------------+---------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Valid` | -+----------------+---------------------------------------------------------------------+ +========== =================================================================== +Applies to :ref:`property or method ` +Options - `groups`_ + - `payload`_ + - `traverse`_ +Class :class:`Symfony\\Component\\Validator\\Constraints\\Valid` +========== =================================================================== .. include:: /reference/forms/types/options/_error_bubbling_hint.rst.inc From 1c5bc4500e15561fc48dd4bfa406dc62812d933d Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 7 Mar 2019 16:04:32 +0100 Subject: [PATCH 2/3] Simplified more tables related to constraints --- reference/constraints/Bic.rst | 10 +- reference/constraints/Blank.rst | 10 +- reference/constraints/CardScheme.rst | 10 +- reference/constraints/Choice.rst | 46 +++--- reference/constraints/Collection.rst | 20 +-- reference/constraints/Count.rst | 39 +++-- reference/constraints/Country.rst | 10 +- reference/constraints/Currency.rst | 10 +- reference/constraints/Date.rst | 10 +- reference/constraints/DateTime.rst | 10 +- reference/constraints/Email.rst | 10 +- reference/constraints/EqualTo.rst | 16 +- reference/constraints/Expression.rst | 10 +- reference/constraints/File.rst | 109 ++++++------- reference/constraints/GreaterThan.rst | 16 +- reference/constraints/GreaterThanOrEqual.rst | 16 +- reference/constraints/Iban.rst | 10 +- reference/constraints/IdenticalTo.rst | 16 +- reference/constraints/Image.rst | 155 +++++++++---------- reference/constraints/Ip.rst | 10 +- reference/constraints/IsFalse.rst | 10 +- reference/constraints/IsNull.rst | 10 +- reference/constraints/IsTrue.rst | 10 +- reference/constraints/Isbn.rst | 40 ++--- reference/constraints/Issn.rst | 10 +- reference/constraints/Language.rst | 10 +- reference/constraints/Length.rst | 52 +++---- reference/constraints/LessThan.rst | 16 +- reference/constraints/LessThanOrEqual.rst | 16 +- reference/constraints/Locale.rst | 10 +- reference/constraints/Luhn.rst | 10 +- reference/constraints/NotBlank.rst | 10 +- reference/constraints/NotEqualTo.rst | 16 +- reference/constraints/NotIdenticalTo.rst | 16 +- reference/constraints/NotNull.rst | 10 +- reference/constraints/Range.rst | 36 ++--- reference/constraints/Regex.rst | 10 +- reference/constraints/Time.rst | 10 +- reference/constraints/Type.rst | 13 +- reference/constraints/UniqueEntity.rst | 10 +- reference/constraints/Url.rst | 10 +- reference/constraints/Uuid.rst | 10 +- 42 files changed, 416 insertions(+), 472 deletions(-) diff --git a/reference/constraints/Bic.rst b/reference/constraints/Bic.rst index 42f9614ea9a..c563e3d8d10 100644 --- a/reference/constraints/Bic.rst +++ b/reference/constraints/Bic.rst @@ -98,11 +98,11 @@ The default message supplied when the value does not pass the BIC check. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ value }}`` | The current (invalid) BIC value | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) BIC value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Blank.rst b/reference/constraints/Blank.rst index d8c99ccea2f..f1dddb5a75d 100644 --- a/reference/constraints/Blank.rst +++ b/reference/constraints/Blank.rst @@ -98,10 +98,10 @@ This is the message that will be shown if the value is not blank. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ value }}`` | The current (invalid) value | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/CardScheme.rst b/reference/constraints/CardScheme.rst index a444af9b389..2ab6b0c793d 100644 --- a/reference/constraints/CardScheme.rst +++ b/reference/constraints/CardScheme.rst @@ -138,11 +138,11 @@ The message shown when the value does not pass the ``CardScheme`` check. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ value }}`` | The current (invalid) value | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Choice.rst b/reference/constraints/Choice.rst index 8b3a03d5341..1084538ef30 100644 --- a/reference/constraints/Choice.rst +++ b/reference/constraints/Choice.rst @@ -336,11 +336,11 @@ choices. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ value }}`` | The current (invalid) value | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== multipleMessage ~~~~~~~~~~~~~~~ @@ -353,11 +353,11 @@ is not in the array of valid choices. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ value }}`` | The current (invalid) value | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== minMessage ~~~~~~~~~~ @@ -369,13 +369,12 @@ too few choices per the `min`_ option. You can use the following parameters in this message: -+--------------------+-------------------------------------------------------+ -| Parameter | Description | -+====================+=======================================================+ -| ``{{ value }}`` | The current (invalid) value | -+--------------------+-------------------------------------------------------+ -| ``{{ choices }}`` | A comma-separated list of available choices | -+--------------------+-------------------------------------------------------+ +================= ============================================================ +Parameter Description +================= ============================================================ +``{{ choices }}`` A comma-separated list of available choices +``{{ value }}`` The current (invalid) value +================= ============================================================ .. versionadded:: 4.3 @@ -391,13 +390,12 @@ too many options per the `max`_ option. You can use the following parameters in this message: -+--------------------+-------------------------------------------------------+ -| Parameter | Description | -+====================+=======================================================+ -| ``{{ value }}`` | The current (invalid) value | -+--------------------+-------------------------------------------------------+ -| ``{{ choices }}`` | A comma-separated list of available choices | -+--------------------+-------------------------------------------------------+ +================= ============================================================ +Parameter Description +================= ============================================================ +``{{ choices }}`` A comma-separated list of available choices +``{{ value }}`` The current (invalid) value +================= ============================================================ .. versionadded:: 4.3 diff --git a/reference/constraints/Collection.rst b/reference/constraints/Collection.rst index b01a12dad02..53d5e59c660 100644 --- a/reference/constraints/Collection.rst +++ b/reference/constraints/Collection.rst @@ -316,11 +316,11 @@ detected. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ field }}`` | The key of the extra field detected | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ field }}`` The key of the extra field detected +=============== ============================================================== fields ~~~~~~ @@ -343,10 +343,10 @@ are missing from the underlying collection. You can use the following parameters in this message: -+------------------+----------------------------------------------------+ -| Parameter | Description | -+==================+====================================================+ -| ``{{ field }}`` | The key of the missing field defined in ``fields`` | -+------------------+----------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ field }}`` The key of the missing field defined in ``fields`` +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Count.rst b/reference/constraints/Count.rst index 511a509fa86..72324f23dde 100644 --- a/reference/constraints/Count.rst +++ b/reference/constraints/Count.rst @@ -129,13 +129,12 @@ is less than the `min`_ option. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ count }}`` | The current collection size | -+------------------+------------------------------------------------+ -| ``{{ limit }}`` | The lower limit | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ count }}`` The current collection size +``{{ limit }}`` The lower limit +=============== ============================================================== maxMessage ~~~~~~~~~~ @@ -147,13 +146,12 @@ is more than the `max`_ option. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ count }}`` | The current collection size | -+------------------+------------------------------------------------+ -| ``{{ limit }}`` | The upper limit | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ count }}`` The current collection size +``{{ limit }}`` The upper limit +=============== ============================================================== exactMessage ~~~~~~~~~~~~ @@ -165,12 +163,11 @@ collection elements count is not exactly this value. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ count }}`` | The current collection size | -+------------------+------------------------------------------------+ -| ``{{ limit }}`` | The exact expected collection size | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ count }}`` The current collection size +``{{ limit }}`` The exact expected collection size +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Country.rst b/reference/constraints/Country.rst index ab801b785ab..6da9c5bc397 100644 --- a/reference/constraints/Country.rst +++ b/reference/constraints/Country.rst @@ -87,11 +87,11 @@ This message is shown if the string is not a valid country code. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ value }}`` | The current (invalid) country code | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) country code +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Currency.rst b/reference/constraints/Currency.rst index 15063da2a24..021b336d9cb 100644 --- a/reference/constraints/Currency.rst +++ b/reference/constraints/Currency.rst @@ -90,11 +90,11 @@ This is the message that will be shown if the value is not a valid currency. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ value }}`` | The current (invalid) value | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Date.rst b/reference/constraints/Date.rst index 52e22d8953c..00c5d2567fc 100644 --- a/reference/constraints/Date.rst +++ b/reference/constraints/Date.rst @@ -94,10 +94,10 @@ This message is shown if the underlying data is not a valid date. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ value }}`` | The current (invalid) value | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/DateTime.rst b/reference/constraints/DateTime.rst index 1a258f9802e..e75a5800dec 100644 --- a/reference/constraints/DateTime.rst +++ b/reference/constraints/DateTime.rst @@ -103,10 +103,10 @@ This message is shown if the underlying data is not a valid datetime. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ value }}`` | The current (invalid) value | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Email.rst b/reference/constraints/Email.rst index d0cac7016fc..a125ac91c39 100644 --- a/reference/constraints/Email.rst +++ b/reference/constraints/Email.rst @@ -131,11 +131,11 @@ This message is shown if the underlying data is not a valid email address. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ value }}`` | The current (invalid) value | -+------------------+------------------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== checkMX ~~~~~~~ diff --git a/reference/constraints/EqualTo.rst b/reference/constraints/EqualTo.rst index 72fe3210b1b..daf334f04f1 100644 --- a/reference/constraints/EqualTo.rst +++ b/reference/constraints/EqualTo.rst @@ -120,15 +120,13 @@ This is the message that will be shown if the value is not equal. You can use the following parameters in this message: -+-------------------------------+-----------------------------+ -| Parameter | Description | -+===============================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-------------------------------+-----------------------------+ -| ``{{ compared_value }}`` | The expected value | -+-------------------------------+-----------------------------+ -| ``{{ compared_value_type }}`` | The expected value type | -+-------------------------------+-----------------------------+ +============================= ================================================ +Parameter Description +============================= ================================================ +``{{ compared_value }}`` The expected value +``{{ compared_value_type }}`` The expected value type +``{{ value }}`` The current (invalid) value +============================= ================================================ .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Expression.rst b/reference/constraints/Expression.rst index c18cdc6335c..a97d4986cc3 100644 --- a/reference/constraints/Expression.rst +++ b/reference/constraints/Expression.rst @@ -256,11 +256,11 @@ The default message supplied when the expression evaluates to false. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/File.rst b/reference/constraints/File.rst index 6abcca7880d..1b613706a54 100644 --- a/reference/constraints/File.rst +++ b/reference/constraints/File.rst @@ -167,19 +167,15 @@ If set, the size of the underlying file must be below this file size in order to be valid. The size of the file can be given in one of the following formats: -+--------+-----------+-----------------+------+ -| Suffix | Unit Name | value | e.g. | -+========+===========+=================+======+ -| | byte | 1 byte | 4096 | -+--------+-----------+-----------------+------+ -| k | kilobyte | 1,000 bytes | 200k | -+--------+-----------+-----------------+------+ -| M | megabyte | 1,000,000 bytes | 2M | -+--------+-----------+-----------------+------+ -| Ki | kibibyte | 1,024 bytes | 32Ki | -+--------+-----------+-----------------+------+ -| Mi | mebibyte | 1,048,576 bytes | 8Mi | -+--------+-----------+-----------------+------+ +====== ========= =============== ======== +Suffix Unit Name Value Example +====== ========= =============== ======== +(none) byte 1 byte ``4096`` +``k`` kilobyte 1,000 bytes ``200k`` +``M`` megabyte 1,000,000 bytes ``2M`` +``Ki`` kibibyte 1,024 bytes ``32Ki`` +``Mi`` mebibyte 1,048,576 bytes ``8Mi`` +====== ========= =============== ======== For more information about the difference between binary and SI prefixes, see `Wikipedia: Binary prefix`_. @@ -217,19 +213,15 @@ The message displayed if the file is larger than the `maxSize`_ option. You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ size }}`` | File size of the given file | -+------------------+------------------------------------------------+ -| ``{{ limit }}`` | Maximum file size allowed | -+------------------+------------------------------------------------+ -| ``{{ suffix }}`` | Suffix for the used file size unit (see above) | -+------------------+------------------------------------------------+ -| ``{{ file }}`` | Absolute file path | -+------------------+------------------------------------------------+ -| ``{{ name }}`` | Base file name | -+------------------+------------------------------------------------+ +================ ============================================================= +Parameter Description +================ ============================================================= +``{{ file }}`` Absolute file path +``{{ limit }}`` Maximum file size allowed +``{{ name }}`` Base file name +``{{ size }}`` File size of the given file +``{{ suffix }}`` Suffix for the used file size unit (see above) +================ ============================================================= mimeTypesMessage ~~~~~~~~~~~~~~~~ @@ -241,17 +233,14 @@ per the `mimeTypes`_ option. You can use the following parameters in this message: -+-----------------+----------------------------------------+ -| Parameter | Description | -+=================+========================================+ -| ``{{ type }}`` | The MIME type of the given file | -+-----------------+----------------------------------------+ -| ``{{ types }}`` | The list of allowed MIME types | -+-----------------+----------------------------------------+ -| ``{{ file }}`` | Absolute file path | -+-----------------+----------------------------------------+ -| ``{{ name }}`` | Base file name | -+-----------------+----------------------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ file }}`` Absolute file path +``{{ name }}`` Base file name +``{{ type }}`` The MIME type of the given file +``{{ types }}`` The list of allowed MIME types +=============== ============================================================== disallowEmptyMessage ~~~~~~~~~~~~~~~~~~~~ @@ -263,13 +252,12 @@ this message is displayed. You can use the following parameters in this message: -+----------------+--------------------+ -| Parameter | Description | -+================+====================+ -| ``{{ file }}`` | Absolute file path | -+----------------+--------------------+ -| ``{{ name }}`` | Base file name | -+----------------+--------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ file }}`` Absolute file path +``{{ name }}`` Base file name +=============== ============================================================== notFoundMessage ~~~~~~~~~~~~~~~ @@ -282,11 +270,11 @@ cannot be constructed with an invalid file path. You can use the following parameters in this message: -+----------------+--------------------+ -| Parameter | Description | -+================+====================+ -| ``{{ file }}`` | Absolute file path | -+----------------+--------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ file }}`` Absolute file path +=============== ============================================================== notReadableMessage ~~~~~~~~~~~~~~~~~~ @@ -298,11 +286,11 @@ fails when passed the path to the file. You can use the following parameters in this message: -+----------------+--------------------+ -| Parameter | Description | -+================+====================+ -| ``{{ file }}`` | Absolute file path | -+----------------+--------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ file }}`` Absolute file path +=============== ============================================================== uploadIniSizeErrorMessage ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -314,13 +302,12 @@ The message that is displayed if the uploaded file is larger than the ``upload_m You can use the following parameters in this message: -+------------------+------------------------------------------------+ -| Parameter | Description | -+==================+================================================+ -| ``{{ limit }}`` | Maximum file size allowed | -+------------------+------------------------------------------------+ -| ``{{ suffix }}`` | Suffix for the used file size unit (see above) | -+------------------+------------------------------------------------+ +================ ============================================================= +Parameter Description +================ ============================================================= +``{{ limit }}`` Maximum file size allowed +``{{ suffix }}`` Suffix for the used file size unit (see above) +================ ============================================================= uploadFormSizeErrorMessage ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/reference/constraints/GreaterThan.rst b/reference/constraints/GreaterThan.rst index 1c4578b8a92..0c283d25fb0 100644 --- a/reference/constraints/GreaterThan.rst +++ b/reference/constraints/GreaterThan.rst @@ -302,15 +302,13 @@ comparison value. You can use the following parameters in this message: -+-------------------------------+-----------------------------+ -| Parameter | Description | -+===============================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-------------------------------+-----------------------------+ -| ``{{ compared_value }}`` | The lower limit | -+-------------------------------+-----------------------------+ -| ``{{ compared_value_type }}`` | The expected value type | -+-------------------------------+-----------------------------+ +============================= ================================================ +Parameter Description +============================= ================================================ +``{{ compared_value }}`` The lower limit +``{{ compared_value_type }}`` The expected value type +``{{ value }}`` The current (invalid) value +============================= ================================================ .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/GreaterThanOrEqual.rst b/reference/constraints/GreaterThanOrEqual.rst index e02c75876c7..e28cc43d552 100644 --- a/reference/constraints/GreaterThanOrEqual.rst +++ b/reference/constraints/GreaterThanOrEqual.rst @@ -300,15 +300,13 @@ to the comparison value. You can use the following parameters in this message: -+-------------------------------+-----------------------------+ -| Parameter | Description | -+===============================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-------------------------------+-----------------------------+ -| ``{{ compared_value }}`` | The lower limit | -+-------------------------------+-----------------------------+ -| ``{{ compared_value_type }}`` | The expected value type | -+-------------------------------+-----------------------------+ +============================= ================================================ +Parameter Description +============================= ================================================ +``{{ compared_value }}`` The lower limit +``{{ compared_value_type }}`` The expected value type +``{{ value }}`` The current (invalid) value +============================= ================================================ .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Iban.rst b/reference/constraints/Iban.rst index 0210c0c2f79..a43eba86c3e 100644 --- a/reference/constraints/Iban.rst +++ b/reference/constraints/Iban.rst @@ -104,11 +104,11 @@ The default message supplied when the value does not pass the Iban check. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/IdenticalTo.rst b/reference/constraints/IdenticalTo.rst index 7ae15984e2a..701257f33a2 100644 --- a/reference/constraints/IdenticalTo.rst +++ b/reference/constraints/IdenticalTo.rst @@ -123,15 +123,13 @@ This is the message that will be shown if the value is not identical. You can use the following parameters in this message: -+-------------------------------+-----------------------------+ -| Parameter | Description | -+===============================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-------------------------------+-----------------------------+ -| ``{{ compared_value }}`` | The expected value | -+-------------------------------+-----------------------------+ -| ``{{ compared_value_type }}`` | The expected value type | -+-------------------------------+-----------------------------+ +============================= ================================================ +Parameter Description +============================= ================================================ +``{{ compared_value }}`` The expected value +``{{ compared_value_type }}`` The expected value type +``{{ value }}`` The current (invalid) value +============================= ================================================ .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Image.rst b/reference/constraints/Image.rst index 8e777758c23..332946f476a 100644 --- a/reference/constraints/Image.rst +++ b/reference/constraints/Image.rst @@ -357,13 +357,12 @@ The error message if the width of the image exceeds `maxWidth`_. You can use the following parameters in this message: -+---------------------+-----------------------------+ -| Parameter | Description | -+=====================+=============================+ -| ``{{ width }}`` | The current (invalid) width | -+---------------------+-----------------------------+ -| ``{{ max_width }}`` | The maximum allowed width | -+---------------------+-----------------------------+ +=================== ========================================================== +Parameter Description +=================== ========================================================== +``{{ max_width }}`` The maximum allowed width +``{{ width }}`` The current (invalid) width +=================== ========================================================== minWidthMessage ~~~~~~~~~~~~~~~ @@ -375,13 +374,12 @@ The error message if the width of the image is less than `minWidth`_. You can use the following parameters in this message: -+---------------------+-----------------------------+ -| Parameter | Description | -+=====================+=============================+ -| ``{{ width }}`` | The current (invalid) width | -+---------------------+-----------------------------+ -| ``{{ min_width }}`` | The minimum required width | -+---------------------+-----------------------------+ +=================== ========================================================== +Parameter Description +=================== ========================================================== +``{{ min_width }}`` The minimum required width +``{{ width }}`` The current (invalid) width +=================== ========================================================== maxHeightMessage ~~~~~~~~~~~~~~~~ @@ -393,13 +391,12 @@ The error message if the height of the image exceeds `maxHeight`_. You can use the following parameters in this message: -+----------------------+------------------------------+ -| Parameter | Description | -+======================+==============================+ -| ``{{ height }}`` | The current (invalid) height | -+----------------------+------------------------------+ -| ``{{ max_height }}`` | The maximum allowed height | -+----------------------+------------------------------+ +==================== ========================================================= +Parameter Description +==================== ========================================================= +``{{ height }}`` The current (invalid) height +``{{ max_height }}`` The maximum allowed height +==================== ========================================================= minHeightMessage ~~~~~~~~~~~~~~~~ @@ -411,13 +408,12 @@ The error message if the height of the image is less than `minHeight`_. You can use the following parameters in this message: -+----------------------+------------------------------+ -| Parameter | Description | -+======================+==============================+ -| ``{{ height }}`` | The current (invalid) height | -+----------------------+------------------------------+ -| ``{{ min_height }}`` | The minimum required height | -+----------------------+------------------------------+ +==================== ========================================================= +Parameter Description +==================== ========================================================= +``{{ height }}`` The current (invalid) height +``{{ min_height }}`` The minimum required height +==================== ========================================================= maxPixelsMessage ~~~~~~~~~~~~~~~~ @@ -429,17 +425,14 @@ The error message if the amount of pixels of the image exceeds `maxPixels`_. You can use the following parameters in this message: -+----------------------+---------------------------------------+ -| Parameter | Description | -+======================+=======================================+ -| ``{{ pixels }}`` | The current amount of pixels | -+----------------------+---------------------------------------+ -| ``{{ max_pixels }}`` | The maximum allowed amount of pixels | -+----------------------+---------------------------------------+ -| ``{{ height }}`` | The current image height | -+----------------------+---------------------------------------+ -| ``{{ width }}`` | The current image width | -+----------------------+---------------------------------------+ +==================== ========================================================= +Parameter Description +==================== ========================================================= +``{{ height }}`` The current image height +``{{ max_pixels }}`` The maximum allowed amount of pixels +``{{ pixels }}`` The current amount of pixels +``{{ width }}`` The current image width +==================== ========================================================= minPixelsMessage ~~~~~~~~~~~~~~~~ @@ -451,17 +444,14 @@ The error message if the amount of pixels of the image is less than `minPixels`_ You can use the following parameters in this message: -+----------------------+---------------------------------------+ -| Parameter | Description | -+======================+=======================================+ -| ``{{ pixels }}`` | The current amount of pixels | -+----------------------+---------------------------------------+ -| ``{{ min_pixels }}`` | The minimum required amount of pixels | -+----------------------+---------------------------------------+ -| ``{{ height }}`` | The current image height | -+----------------------+---------------------------------------+ -| ``{{ width }}`` | The current image width | -+----------------------+---------------------------------------+ +==================== ========================================================= +Parameter Description +==================== ========================================================= +``{{ height }}`` The current image height +``{{ min_pixels }}`` The minimum required amount of pixels +``{{ pixels }}`` The current amount of pixels +``{{ width }}`` The current image width +==================== ========================================================= maxRatioMessage ~~~~~~~~~~~~~~~ @@ -473,13 +463,12 @@ The error message if the aspect ratio of the image exceeds `maxRatio`_. You can use the following parameters in this message: -+---------------------+-----------------------------+ -| Parameter | Description | -+=====================+=============================+ -| ``{{ ratio }}`` | The current (invalid) ratio | -+---------------------+-----------------------------+ -| ``{{ max_ratio }}`` | The maximum allowed ratio | -+---------------------+-----------------------------+ +=================== ========================================================== +Parameter Description +=================== ========================================================== +``{{ max_ratio }}`` The maximum required ratio +``{{ ratio }}`` The current (invalid) ratio +=================== ========================================================== minRatioMessage ~~~~~~~~~~~~~~~ @@ -491,13 +480,12 @@ The error message if the aspect ratio of the image is less than `minRatio`_. You can use the following parameters in this message: -+---------------------+-----------------------------+ -| Parameter | Description | -+=====================+=============================+ -| ``{{ ratio }}`` | The current (invalid) ratio | -+---------------------+-----------------------------+ -| ``{{ min_ratio }}`` | The minimum required ratio | -+---------------------+-----------------------------+ +=================== ========================================================== +Parameter Description +=================== ========================================================== +``{{ min_ratio }}`` The minimum required ratio +``{{ ratio }}`` The current (invalid) ratio +=================== ========================================================== allowSquareMessage ~~~~~~~~~~~~~~~~~~ @@ -509,13 +497,12 @@ The error message if the image is square and you set `allowSquare`_ to ``false`` You can use the following parameters in this message: -+------------------+--------------------+ -| Parameter | Description | -+==================+====================+ -| ``{{ width }}`` | The current width | -+------------------+--------------------+ -| ``{{ height }}`` | The current height | -+------------------+--------------------+ +================ ============================================================= +Parameter Description +================ ============================================================= +``{{ height }}`` The current height +``{{ width }}`` The current width +================ ============================================================= allowLandscapeMessage ~~~~~~~~~~~~~~~~~~~~~ @@ -527,13 +514,12 @@ The error message if the image is landscape oriented and you set `allowLandscape You can use the following parameters in this message: -+------------------+--------------------+ -| Parameter | Description | -+==================+====================+ -| ``{{ width }}`` | The current width | -+------------------+--------------------+ -| ``{{ height }}`` | The current height | -+------------------+--------------------+ +================ ============================================================= +Parameter Description +================ ============================================================= +``{{ height }}`` The current height +``{{ width }}`` The current width +================ ============================================================= allowPortraitMessage ~~~~~~~~~~~~~~~~~~~~ @@ -545,13 +531,12 @@ The error message if the image is portrait oriented and you set `allowPortrait`_ You can use the following parameters in this message: -+------------------+--------------------+ -| Parameter | Description | -+==================+====================+ -| ``{{ width }}`` | The current width | -+------------------+--------------------+ -| ``{{ height }}`` | The current height | -+------------------+--------------------+ +================ ============================================================= +Parameter Description +================ ============================================================= +``{{ height }}`` The current height +``{{ width }}`` The current width +================ ============================================================= corruptedMessage ~~~~~~~~~~~~~~~~ diff --git a/reference/constraints/Ip.rst b/reference/constraints/Ip.rst index 88a21da7bfc..4d519d0feae 100644 --- a/reference/constraints/Ip.rst +++ b/reference/constraints/Ip.rst @@ -134,10 +134,10 @@ This message is shown if the string is not a valid IP address. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/IsFalse.rst b/reference/constraints/IsFalse.rst index 05142eb773d..d996991dc85 100644 --- a/reference/constraints/IsFalse.rst +++ b/reference/constraints/IsFalse.rst @@ -114,10 +114,10 @@ This message is shown if the underlying data is not false. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/IsNull.rst b/reference/constraints/IsNull.rst index 0a201a2db0c..b66c8328fe7 100644 --- a/reference/constraints/IsNull.rst +++ b/reference/constraints/IsNull.rst @@ -92,10 +92,10 @@ This is the message that will be shown if the value is not ``null``. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/IsTrue.rst b/reference/constraints/IsTrue.rst index 8203498f9ad..9bf65c8c774 100644 --- a/reference/constraints/IsTrue.rst +++ b/reference/constraints/IsTrue.rst @@ -128,10 +128,10 @@ This message is shown if the underlying data is not true. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Isbn.rst b/reference/constraints/Isbn.rst index a2f84140002..265d41467cf 100644 --- a/reference/constraints/Isbn.rst +++ b/reference/constraints/Isbn.rst @@ -117,11 +117,11 @@ this message has priority over all the other messages. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== isbn10Message ~~~~~~~~~~~~~ @@ -133,11 +133,11 @@ value does not pass the ISBN-10 check. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== isbn13Message ~~~~~~~~~~~~~ @@ -149,11 +149,11 @@ value does not pass the ISBN-13 check. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== bothIsbnMessage ~~~~~~~~~~~~~~~ @@ -165,11 +165,11 @@ value does not pass any of the ISBN checks. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Issn.rst b/reference/constraints/Issn.rst index 09282cd5cea..9b0fcf3c6f8 100644 --- a/reference/constraints/Issn.rst +++ b/reference/constraints/Issn.rst @@ -90,11 +90,11 @@ The message shown if the given value is not a valid ISSN. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== caseSensitive ~~~~~~~~~~~~~ diff --git a/reference/constraints/Language.rst b/reference/constraints/Language.rst index 922e7ec01eb..74cf6c994cf 100644 --- a/reference/constraints/Language.rst +++ b/reference/constraints/Language.rst @@ -88,10 +88,10 @@ This message is shown if the string is not a valid language code. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Length.rst b/reference/constraints/Length.rst index beef661ea17..16af49cddde 100644 --- a/reference/constraints/Length.rst +++ b/reference/constraints/Length.rst @@ -154,13 +154,12 @@ than the `min`_ option. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ -| ``{{ limit }}`` | The expected minimum length | -+-----------------+-----------------------------+ +================= ============================================================ +Parameter Description +================= ============================================================ +``{{ limit }}`` The expected minimum length +``{{ value }}`` The current (invalid) value +================= ============================================================ maxMessage ~~~~~~~~~~ @@ -172,13 +171,12 @@ than the `max`_ option. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ -| ``{{ limit }}`` | The expected maximum length | -+-----------------+-----------------------------+ +================= ============================================================ +Parameter Description +================= ============================================================ +``{{ limit }}`` The expected maximum length +``{{ value }}`` The current (invalid) value +================= ============================================================ exactMessage ~~~~~~~~~~~~ @@ -190,13 +188,12 @@ value's length is not exactly this value. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ -| ``{{ limit }}`` | The exact expected length | -+-----------------+-----------------------------+ +================= ============================================================ +Parameter Description +================= ============================================================ +``{{ limit }}`` The exact expected length +``{{ value }}`` The current (invalid) value +================= ============================================================ charsetMessage ~~~~~~~~~~~~~~ @@ -207,13 +204,12 @@ The message that will be shown if the value is not using the given `charset`_. You can use the following parameters in this message: -+-------------------+-----------------------------+ -| Parameter | Description | -+===================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-------------------+-----------------------------+ -| ``{{ charset }}`` | The expected charset | -+-------------------+-----------------------------+ +================= ============================================================ +Parameter Description +================= ============================================================ +``{{ charset }}`` The expected charset +``{{ value }}`` The current (invalid) value +================= ============================================================ .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/LessThan.rst b/reference/constraints/LessThan.rst index d101233d1d5..d3d8d55aa7d 100644 --- a/reference/constraints/LessThan.rst +++ b/reference/constraints/LessThan.rst @@ -301,15 +301,13 @@ comparison value. You can use the following parameters in this message: -+-------------------------------+-----------------------------+ -| Parameter | Description | -+===============================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-------------------------------+-----------------------------+ -| ``{{ compared_value }}`` | The upper limit | -+-------------------------------+-----------------------------+ -| ``{{ compared_value_type }}`` | The expected value type | -+-------------------------------+-----------------------------+ +============================= ================================================ +Parameter Description +============================= ================================================ +``{{ compared_value }}`` The upper limit +``{{ compared_value_type }}`` The expected value type +``{{ value }}`` The current (invalid) value +============================= ================================================ .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/LessThanOrEqual.rst b/reference/constraints/LessThanOrEqual.rst index b21734d5126..ba277243a8f 100644 --- a/reference/constraints/LessThanOrEqual.rst +++ b/reference/constraints/LessThanOrEqual.rst @@ -299,15 +299,13 @@ to the comparison value. You can use the following parameters in this message: -+-------------------------------+-----------------------------+ -| Parameter | Description | -+===============================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-------------------------------+-----------------------------+ -| ``{{ compared_value }}`` | The upper limit | -+-------------------------------+-----------------------------+ -| ``{{ compared_value_type }}`` | The expected value type | -+-------------------------------+-----------------------------+ +============================= ================================================ +Parameter Description +============================= ================================================ +``{{ compared_value }}`` The upper limit +``{{ compared_value_type }}`` The expected value type +``{{ value }}`` The current (invalid) value +============================= ================================================ .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Locale.rst b/reference/constraints/Locale.rst index 6d67edab9c8..068789ca87f 100644 --- a/reference/constraints/Locale.rst +++ b/reference/constraints/Locale.rst @@ -98,11 +98,11 @@ This message is shown if the string is not a valid locale. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Luhn.rst b/reference/constraints/Luhn.rst index 911a788db56..fa323b51115 100644 --- a/reference/constraints/Luhn.rst +++ b/reference/constraints/Luhn.rst @@ -99,11 +99,11 @@ The default message supplied when the value does not pass the Luhn check. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/NotBlank.rst b/reference/constraints/NotBlank.rst index 1e8304a53c0..244cc337007 100644 --- a/reference/constraints/NotBlank.rst +++ b/reference/constraints/NotBlank.rst @@ -90,10 +90,10 @@ This is the message that will be shown if the value is blank. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/NotEqualTo.rst b/reference/constraints/NotEqualTo.rst index b737ec3641f..2e78f09462f 100644 --- a/reference/constraints/NotEqualTo.rst +++ b/reference/constraints/NotEqualTo.rst @@ -122,15 +122,13 @@ This is the message that will be shown if the value is equal. You can use the following parameters in this message: -+-------------------------------+-----------------------------+ -| Parameter | Description | -+===============================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-------------------------------+-----------------------------+ -| ``{{ compared_value }}`` | The expected value | -+-------------------------------+-----------------------------+ -| ``{{ compared_value_type }}`` | The expected value type | -+-------------------------------+-----------------------------+ +============================= ================================================ +Parameter Description +============================= ================================================ +``{{ compared_value }}`` The expected value +``{{ compared_value_type }}`` The expected value type +``{{ value }}`` The current (invalid) value +============================= ================================================ .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/NotIdenticalTo.rst b/reference/constraints/NotIdenticalTo.rst index ca299fe79bf..6cdf78fee04 100644 --- a/reference/constraints/NotIdenticalTo.rst +++ b/reference/constraints/NotIdenticalTo.rst @@ -123,15 +123,13 @@ This is the message that will be shown if the value is identical. You can use the following parameters in this message: -+-------------------------------+-----------------------------+ -| Parameter | Description | -+===============================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-------------------------------+-----------------------------+ -| ``{{ compared_value }}`` | The expected value | -+-------------------------------+-----------------------------+ -| ``{{ compared_value_type }}`` | The expected value type | -+-------------------------------+-----------------------------+ +============================= ================================================ +Parameter Description +============================= ================================================ +``{{ compared_value }}`` The expected value +``{{ compared_value_type }}`` The expected value type +``{{ value }}`` The current (invalid) value +============================= ================================================ .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/NotNull.rst b/reference/constraints/NotNull.rst index 56db0528567..0bd1c10c397 100644 --- a/reference/constraints/NotNull.rst +++ b/reference/constraints/NotNull.rst @@ -90,10 +90,10 @@ This is the message that will be shown if the value is ``null``. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Range.rst b/reference/constraints/Range.rst index c3818f621b1..02f4d0dddd3 100644 --- a/reference/constraints/Range.rst +++ b/reference/constraints/Range.rst @@ -341,13 +341,12 @@ The message that will be shown if the underlying value is less than the You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ -| ``{{ limit }}`` | The lower limit | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ limit }}`` The lower limit +``{{ value }}`` The current (invalid) value +=============== ============================================================== maxMessage ~~~~~~~~~~ @@ -359,13 +358,12 @@ The message that will be shown if the underlying value is more than the You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ -| ``{{ limit }}`` | The upper limit | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ limit }}`` The upper limit +``{{ value }}`` The current (invalid) value +=============== ============================================================== invalidMessage ~~~~~~~~~~~~~~ @@ -377,11 +375,11 @@ the `is_numeric`_ PHP function). You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Regex.rst b/reference/constraints/Regex.rst index fcc84fbf2f8..9f9237b75c8 100644 --- a/reference/constraints/Regex.rst +++ b/reference/constraints/Regex.rst @@ -281,10 +281,10 @@ This is the message that will be shown if this validator fails. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Time.rst b/reference/constraints/Time.rst index 69cf262ce93..300eba60b1d 100644 --- a/reference/constraints/Time.rst +++ b/reference/constraints/Time.rst @@ -97,10 +97,10 @@ This message is shown if the underlying data is not a valid time. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Type.rst b/reference/constraints/Type.rst index 4bdd19f6189..b3111cd856e 100644 --- a/reference/constraints/Type.rst +++ b/reference/constraints/Type.rst @@ -162,13 +162,12 @@ The message if the underlying data is not of the given type. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ -| ``{{ type }}`` | The expected type | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ type }}`` The expected type +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index 6c3b59f8cbc..0527b1428da 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -150,11 +150,11 @@ class __CLASS__ identified by "* You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== em ~~ diff --git a/reference/constraints/Url.rst b/reference/constraints/Url.rst index 41a13db6a8e..9e1405533e7 100644 --- a/reference/constraints/Url.rst +++ b/reference/constraints/Url.rst @@ -91,11 +91,11 @@ This message is shown if the URL is invalid. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. configuration-block:: diff --git a/reference/constraints/Uuid.rst b/reference/constraints/Uuid.rst index 8d253f7c616..d570c277ab3 100644 --- a/reference/constraints/Uuid.rst +++ b/reference/constraints/Uuid.rst @@ -92,11 +92,11 @@ This message is shown if the string is not a valid UUID. You can use the following parameters in this message: -+-----------------+-----------------------------+ -| Parameter | Description | -+=================+=============================+ -| ``{{ value }}`` | The current (invalid) value | -+-----------------+-----------------------------+ +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== strict ~~~~~~ From 722c0083a2fc5acd62b7a017e840e319aa958402 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 7 Mar 2019 17:00:29 +0100 Subject: [PATCH 3/3] Sorted the contents of the validator articles --- reference/constraints/Bic.rst | 38 +- reference/constraints/CardScheme.rst | 34 +- reference/constraints/Choice.rst | 110 +++--- reference/constraints/Count.rst | 58 +-- reference/constraints/DivisibleBy.rst | 7 +- reference/constraints/Email.rst | 80 ++--- reference/constraints/EqualTo.rst | 4 +- reference/constraints/File.rst | 172 ++++----- reference/constraints/GreaterThan.rst | 4 +- reference/constraints/GreaterThanOrEqual.rst | 4 +- reference/constraints/IdenticalTo.rst | 4 +- reference/constraints/Image.rst | 350 ++++++++++--------- reference/constraints/Ip.rst | 38 +- reference/constraints/Isbn.rst | 40 +-- reference/constraints/Issn.rst | 18 +- reference/constraints/Length.rst | 90 ++--- reference/constraints/LessThan.rst | 4 +- reference/constraints/LessThanOrEqual.rst | 4 +- reference/constraints/Locale.rst | 26 +- reference/constraints/NotEqualTo.rst | 4 +- reference/constraints/NotIdenticalTo.rst | 4 +- reference/constraints/Range.rst | 56 +-- reference/constraints/Regex.rst | 22 +- reference/constraints/Type.rst | 40 +-- reference/constraints/UniqueEntity.rst | 100 +++--- reference/constraints/Url.rst | 132 +++---- reference/constraints/Uuid.rst | 4 +- reference/constraints/Valid.rst | 8 +- 28 files changed, 731 insertions(+), 724 deletions(-) diff --git a/reference/constraints/Bic.rst b/reference/constraints/Bic.rst index c563e3d8d10..49060cf5f64 100644 --- a/reference/constraints/Bic.rst +++ b/reference/constraints/Bic.rst @@ -9,11 +9,11 @@ check that the BIC is associated with a given IBAN. ========== =================================================================== Applies to :ref:`property or method ` Options - `groups`_ - - `message`_ - - `payload`_ - `iban`_ - `ibanMessage`_ - `ibanPropertyPath`_ + - `message`_ + - `payload`_ Class :class:`Symfony\\Component\\Validator\\Constraints\\Bic` Validator :class:`Symfony\\Component\\Validator\\Constraints\\BicValidator` ========== =================================================================== @@ -89,23 +89,6 @@ Available Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ - -**type**: ``string`` **default**: ``This is not a valid Business Identifier Code (BIC).`` - -The default message supplied when the value does not pass the BIC check. - -You can use the following parameters in this message: - -=============== ============================================================== -Parameter Description -=============== ============================================================== -``{{ value }}`` The current (invalid) BIC value -=============== ============================================================== - -.. include:: /reference/constraints/_payload-option.rst.inc - iban ~~~~ @@ -131,4 +114,21 @@ For example, if you want to compare the ``$bic`` property of some object with regard to the ``$iban`` property of the same object, use ``propertyPath="iban"`` in the comparison constraint of ``$bic``. +message +~~~~~~~ + +**type**: ``string`` **default**: ``This is not a valid Business Identifier Code (BIC).`` + +The default message supplied when the value does not pass the BIC check. + +You can use the following parameters in this message: + +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) BIC value +=============== ============================================================== + +.. include:: /reference/constraints/_payload-option.rst.inc + .. _`Business Identifier Code (BIC)`: https://en.wikipedia.org/wiki/Business_Identifier_Code diff --git a/reference/constraints/CardScheme.rst b/reference/constraints/CardScheme.rst index 2ab6b0c793d..9cc0db7f85d 100644 --- a/reference/constraints/CardScheme.rst +++ b/reference/constraints/CardScheme.rst @@ -101,6 +101,23 @@ Available Options .. include:: /reference/constraints/_groups-option.rst.inc +message +~~~~~~~ + +**type**: ``string`` **default**: ``Unsupported card type or invalid card number.`` + +The message shown when the value does not pass the ``CardScheme`` check. + +You can use the following parameters in this message: + +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== + +.. include:: /reference/constraints/_payload-option.rst.inc + schemes ~~~~~~~ @@ -129,21 +146,4 @@ Valid values are: For more information about the used schemes, see `Wikipedia: Issuer identification number (IIN)`_. -message -~~~~~~~ - -**type**: ``string`` **default**: ``Unsupported card type or invalid card number.`` - -The message shown when the value does not pass the ``CardScheme`` check. - -You can use the following parameters in this message: - -=============== ============================================================== -Parameter Description -=============== ============================================================== -``{{ value }}`` The current (invalid) value -=============== ============================================================== - -.. include:: /reference/constraints/_payload-option.rst.inc - .. _`Wikipedia: Issuer identification number (IIN)`: https://en.wikipedia.org/wiki/Bank_card_number#Issuer_identification_number_.28IIN.29 diff --git a/reference/constraints/Choice.rst b/reference/constraints/Choice.rst index 1084538ef30..ac498d21c7e 100644 --- a/reference/constraints/Choice.rst +++ b/reference/constraints/Choice.rst @@ -275,15 +275,6 @@ you can pass the class name and the method as an array. Available Options ----------------- -choices -~~~~~~~ - -**type**: ``array`` [:ref:`default option `] - -A required option (unless `callback`_ is specified) - this is the array -of options that should be considered in the valid set. The input value -will be matched against this array. - callback ~~~~~~~~ @@ -293,27 +284,16 @@ 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. -.. include:: /reference/constraints/_groups-option.rst.inc - -multiple -~~~~~~~~ - -**type**: ``boolean`` **default**: ``false`` - -If this option is true, the input value is expected to be an array instead -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. +choices +~~~~~~~ -min -~~~ +**type**: ``array`` [:ref:`default option `] -**type**: ``integer`` +A required option (unless `callback`_ is specified) - this is the array +of options that should be considered in the valid set. The input value +will be matched against this array. -If the ``multiple`` option is true, then you can use the ``min`` option -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. +.. include:: /reference/constraints/_groups-option.rst.inc max ~~~ @@ -325,6 +305,27 @@ 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 +~~~~~~~~~~ + +**type**: ``string`` **default**: ``You must select at most {{ limit }} choices.`` + +This is the validation error message that's displayed when the user chooses +too many options per the `max`_ option. + +You can use the following parameters in this message: + +================= ============================================================ +Parameter Description +================= ============================================================ +``{{ choices }}`` A comma-separated list of available choices +``{{ value }}`` The current (invalid) value +================= ============================================================ + +.. versionadded:: 4.3 + + The ``{{ choices }}`` parameter was introduced in Symfony 4.3. + message ~~~~~~~ @@ -342,22 +343,15 @@ Parameter Description ``{{ value }}`` The current (invalid) value =============== ============================================================== -multipleMessage -~~~~~~~~~~~~~~~ - -**type**: ``string`` **default**: ``One or more of the given values is invalid.`` - -This is the message that you will receive if the ``multiple`` option is -set to ``true`` and one of the values on the underlying array being checked -is not in the array of valid choices. +min +~~~ -You can use the following parameters in this message: +**type**: ``integer`` -=============== ============================================================== -Parameter Description -=============== ============================================================== -``{{ value }}`` The current (invalid) value -=============== ============================================================== +If the ``multiple`` option is true, then you can use the ``min`` option +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 ~~~~~~~~~~ @@ -380,25 +374,31 @@ Parameter Description The ``{{ choices }}`` parameter was introduced in Symfony 4.3. -maxMessage -~~~~~~~~~~ +multiple +~~~~~~~~ -**type**: ``string`` **default**: ``You must select at most {{ limit }} choices.`` +**type**: ``boolean`` **default**: ``false`` -This is the validation error message that's displayed when the user chooses -too many options per the `max`_ option. +If this option is true, the input value is expected to be an array instead +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. -You can use the following parameters in this message: +multipleMessage +~~~~~~~~~~~~~~~ -================= ============================================================ -Parameter Description -================= ============================================================ -``{{ choices }}`` A comma-separated list of available choices -``{{ value }}`` The current (invalid) value -================= ============================================================ +**type**: ``string`` **default**: ``One or more of the given values is invalid.`` -.. versionadded:: 4.3 +This is the message that you will receive if the ``multiple`` option is +set to ``true`` and one of the values on the underlying array being checked +is not in the array of valid choices. - The ``{{ choices }}`` parameter was introduced in Symfony 4.3. +You can use the following parameters in this message: + +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Count.rst b/reference/constraints/Count.rst index 72324f23dde..7bb80face60 100644 --- a/reference/constraints/Count.rst +++ b/reference/constraints/Count.rst @@ -101,15 +101,24 @@ you might add the following: Options ------- -.. include:: /reference/constraints/_groups-option.rst.inc +exactMessage +~~~~~~~~~~~~ -min -~~~ +**type**: ``string`` **default**: ``This collection should contain exactly {{ limit }} elements.`` -**type**: ``integer`` +The message that will be shown if min and max values are equal and the underlying +collection elements count is not exactly this value. -This required option is the "min" count value. Validation will fail if the -given collection elements count is **less** than this min value. +You can use the following parameters in this message: + +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ count }}`` The current collection size +``{{ limit }}`` The exact expected collection size +=============== ============================================================== + +.. include:: /reference/constraints/_groups-option.rst.inc max ~~~ @@ -119,23 +128,6 @@ max This required option is the "max" count value. Validation will fail if the given collection elements count is **greater** than this max value. -minMessage -~~~~~~~~~~ - -**type**: ``string`` **default**: ``This collection should contain {{ limit }} elements or more.`` - -The message that will be shown if the underlying collection elements count -is less than the `min`_ option. - -You can use the following parameters in this message: - -=============== ============================================================== -Parameter Description -=============== ============================================================== -``{{ count }}`` The current collection size -``{{ limit }}`` The lower limit -=============== ============================================================== - maxMessage ~~~~~~~~~~ @@ -153,13 +145,21 @@ Parameter Description ``{{ limit }}`` The upper limit =============== ============================================================== -exactMessage -~~~~~~~~~~~~ +min +~~~ -**type**: ``string`` **default**: ``This collection should contain exactly {{ limit }} elements.`` +**type**: ``integer`` -The message that will be shown if min and max values are equal and the underlying -collection elements count is not exactly this value. +This required option is the "min" count value. Validation will fail if the +given collection elements count is **less** than this min value. + +minMessage +~~~~~~~~~~ + +**type**: ``string`` **default**: ``This collection should contain {{ limit }} elements or more.`` + +The message that will be shown if the underlying collection elements count +is less than the `min`_ option. You can use the following parameters in this message: @@ -167,7 +167,7 @@ You can use the following parameters in this message: Parameter Description =============== ============================================================== ``{{ count }}`` The current collection size -``{{ limit }}`` The exact expected collection size +``{{ limit }}`` The lower limit =============== ============================================================== .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/DivisibleBy.rst b/reference/constraints/DivisibleBy.rst index 8d7a57cd502..c5cee2f6405 100644 --- a/reference/constraints/DivisibleBy.rst +++ b/reference/constraints/DivisibleBy.rst @@ -5,7 +5,8 @@ Validates that a value is divisible by another value, defined in the options. ========== =================================================================== Applies to :ref:`property or method ` -Options - `message`_ +Options - `groups`_ + - `message`_ - `payload`_ - `propertyPath`_ - `value`_ @@ -102,7 +103,7 @@ The following constraints ensure that: Options ------- -.. include:: /reference/constraints/_comparison-value-option.rst.inc +.. include:: /reference/constraints/_groups-option.rst.inc message ~~~~~~~ @@ -124,3 +125,5 @@ It defines the object property whose value is used to make the comparison. For example, if you want to compare the ``$value`` property of some object with regard to the ``$increments`` property of the same object, use ``propertyPath="increments"`` in the comparison constraint of ``$value``. + +.. include:: /reference/constraints/_comparison-value-option.rst.inc diff --git a/reference/constraints/Email.rst b/reference/constraints/Email.rst index a125ac91c39..e49724acfae 100644 --- a/reference/constraints/Email.rst +++ b/reference/constraints/Email.rst @@ -91,36 +91,37 @@ Basic Usage Options ------- -.. include:: /reference/constraints/_groups-option.rst.inc +checkHost +~~~~~~~~~ -mode -~~~~ +**type**: ``boolean`` **default**: ``false`` -**type**: ``string`` **default**: ``loose`` +.. versionadded:: 4.2 -This option is optional and defines the pattern the email address is validated against. -Valid values are: + This option was deprecated in Symfony 4.2. -* ``loose`` -* ``strict`` -* ``html5`` +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. -loose -..... +checkMX +~~~~~~~ -A simple regular expression. Allows all values with an "@" symbol in, and a "." -in the second host part of the email address. +**type**: ``boolean`` **default**: ``false`` -strict -...... +.. versionadded:: 4.2 -Uses the `egulias/email-validator`_ library to perform an RFC compliant -validation. You will need to install that library to use this mode. + This option was deprecated in Symfony 4.2. -html5 -..... +If true, then the :phpfunction:`checkdnsrr` PHP function will be used to +check the validity of the MX record of the host of the given email. -This matches the pattern used for the `HTML5 email input element`_. +.. caution:: + + This option is not reliable because it depends on the network conditions + and some valid servers refuse to respond to those requests. + +.. include:: /reference/constraints/_groups-option.rst.inc message ~~~~~~~ @@ -137,35 +138,34 @@ Parameter Description ``{{ value }}`` The current (invalid) value =============== ============================================================== -checkMX -~~~~~~~ - -**type**: ``boolean`` **default**: ``false`` - -.. versionadded:: 4.2 +mode +~~~~ - This option was deprecated in Symfony 4.2. +**type**: ``string`` **default**: ``loose`` -If true, then the :phpfunction:`checkdnsrr` PHP function will be used to -check the validity of the MX record of the host of the given email. +This option is optional and defines the pattern the email address is validated against. +Valid values are: -.. caution:: +* ``loose`` +* ``strict`` +* ``html5`` - This option is not reliable because it depends on the network conditions - and some valid servers refuse to respond to those requests. +loose +..... -checkHost -~~~~~~~~~ +A simple regular expression. Allows all values with an "@" symbol in, and a "." +in the second host part of the email address. -**type**: ``boolean`` **default**: ``false`` +strict +...... -.. versionadded:: 4.2 +Uses the `egulias/email-validator`_ library to perform an RFC compliant +validation. You will need to install that library to use this mode. - This option was deprecated in Symfony 4.2. +html5 +..... -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. +This matches the pattern used for the `HTML5 email input element`_. .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/EqualTo.rst b/reference/constraints/EqualTo.rst index daf334f04f1..46f070f87a6 100644 --- a/reference/constraints/EqualTo.rst +++ b/reference/constraints/EqualTo.rst @@ -107,8 +107,6 @@ and that the ``age`` is ``20``, you could do the following: Options ------- -.. include:: /reference/constraints/_comparison-value-option.rst.inc - .. include:: /reference/constraints/_groups-option.rst.inc message @@ -131,3 +129,5 @@ Parameter Description .. include:: /reference/constraints/_payload-option.rst.inc .. include:: /reference/constraints/_comparison-propertypath-option.rst.inc + +.. include:: /reference/constraints/_comparison-value-option.rst.inc diff --git a/reference/constraints/File.rst b/reference/constraints/File.rst index 1b613706a54..12dd589ecc2 100644 --- a/reference/constraints/File.rst +++ b/reference/constraints/File.rst @@ -158,6 +158,38 @@ have been specified. Options ------- +binaryFormat +~~~~~~~~~~~~ + +**type**: ``boolean`` **default**: ``null`` + +When ``true``, the sizes will be displayed in messages with binary-prefixed +units (KiB, MiB). When ``false``, the sizes will be displayed with SI-prefixed +units (kB, MB). When ``null``, then the binaryFormat will be guessed from +the value defined in the ``maxSize`` option. + +For more information about the difference between binary and SI prefixes, +see `Wikipedia: Binary prefix`_. + +disallowEmptyMessage +~~~~~~~~~~~~~~~~~~~~ + +**type**: ``string`` **default**: ``An empty file is not allowed.`` + +This constraint checks if the uploaded file is empty (i.e. 0 bytes). If it is, +this message is displayed. + +You can use the following parameters in this message: + +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ file }}`` Absolute file path +``{{ name }}`` Base file name +=============== ============================================================== + +.. include:: /reference/constraints/_groups-option.rst.inc + maxSize ~~~~~~~ @@ -180,30 +212,6 @@ Suffix Unit Name Value Example For more information about the difference between binary and SI prefixes, see `Wikipedia: Binary prefix`_. -binaryFormat -~~~~~~~~~~~~ - -**type**: ``boolean`` **default**: ``null`` - -When ``true``, the sizes will be displayed in messages with binary-prefixed -units (KiB, MiB). When ``false``, the sizes will be displayed with SI-prefixed -units (kB, MB). When ``null``, then the binaryFormat will be guessed from -the value defined in the ``maxSize`` option. - -For more information about the difference between binary and SI prefixes, -see `Wikipedia: Binary prefix`_. - -mimeTypes -~~~~~~~~~ - -**type**: ``array`` or ``string`` - -If set, the validator will check that the mime type of the underlying file -is equal to the given mime type (if a string) or exists in the collection -of given mime types (if an array). - -You can find a list of existing mime types on the `IANA website`_. - maxSizeMessage ~~~~~~~~~~~~~~ @@ -223,6 +231,17 @@ Parameter Description ``{{ suffix }}`` Suffix for the used file size unit (see above) ================ ============================================================= +mimeTypes +~~~~~~~~~ + +**type**: ``array`` or ``string`` + +If set, the validator will check that the mime type of the underlying file +is equal to the given mime type (if a string) or exists in the collection +of given mime types (if an array). + +You can find a list of existing mime types on the `IANA website`_. + mimeTypesMessage ~~~~~~~~~~~~~~~~ @@ -242,23 +261,6 @@ Parameter Description ``{{ types }}`` The list of allowed MIME types =============== ============================================================== -disallowEmptyMessage -~~~~~~~~~~~~~~~~~~~~ - -**type**: ``string`` **default**: ``An empty file is not allowed.`` - -This constraint checks if the uploaded file is empty (i.e. 0 bytes). If it is, -this message is displayed. - -You can use the following parameters in this message: - -=============== ============================================================== -Parameter Description -=============== ============================================================== -``{{ file }}`` Absolute file path -``{{ name }}`` Base file name -=============== ============================================================== - notFoundMessage ~~~~~~~~~~~~~~~ @@ -292,22 +294,37 @@ Parameter Description ``{{ file }}`` Absolute file path =============== ============================================================== -uploadIniSizeErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~ +.. include:: /reference/constraints/_payload-option.rst.inc -**type**: ``string`` **default**: ``The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.`` +uploadCantWriteErrorMessage +~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The message that is displayed if the uploaded file is larger than the ``upload_max_filesize`` -``php.ini`` setting. +**type**: ``string`` **default**: ``Cannot write temporary file to disk.`` -You can use the following parameters in this message: +The message that is displayed if the uploaded file can't be stored in the +temporary folder. -================ ============================================================= -Parameter Description -================ ============================================================= -``{{ limit }}`` Maximum file size allowed -``{{ suffix }}`` Suffix for the used file size unit (see above) -================ ============================================================= +This message has no parameters. + +uploadErrorMessage +~~~~~~~~~~~~~~~~~~ + +**type**: ``string`` **default**: ``The file could not be uploaded.`` + +The message that is displayed if the uploaded file could not be uploaded +for some unknown reason. + +This message has no parameters. + +uploadExtensionErrorMessage +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**type**: ``string`` **default**: ``A PHP extension caused the upload to fail.`` + +The message that is displayed if a PHP extension caused the file upload to +fail. + +This message has no parameters. uploadFormSizeErrorMessage ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -319,14 +336,22 @@ by the HTML file input field. This message has no parameters. -uploadPartialErrorMessage +uploadIniSizeErrorMessage ~~~~~~~~~~~~~~~~~~~~~~~~~ -**type**: ``string`` **default**: ``The file was only partially uploaded.`` +**type**: ``string`` **default**: ``The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.`` -The message that is displayed if the uploaded file is only partially uploaded. +The message that is displayed if the uploaded file is larger than the ``upload_max_filesize`` +``php.ini`` setting. -This message has no parameters. +You can use the following parameters in this message: + +================ ============================================================= +Parameter Description +================ ============================================================= +``{{ limit }}`` Maximum file size allowed +``{{ suffix }}`` Suffix for the used file size unit (see above) +================ ============================================================= uploadNoFileErrorMessage ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -347,39 +372,14 @@ missing. This message has no parameters. -uploadCantWriteErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -**type**: ``string`` **default**: ``Cannot write temporary file to disk.`` - -The message that is displayed if the uploaded file can't be stored in the -temporary folder. - -This message has no parameters. - -uploadExtensionErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -**type**: ``string`` **default**: ``A PHP extension caused the upload to fail.`` - -The message that is displayed if a PHP extension caused the file upload to -fail. - -This message has no parameters. - -uploadErrorMessage -~~~~~~~~~~~~~~~~~~ +uploadPartialErrorMessage +~~~~~~~~~~~~~~~~~~~~~~~~~ -**type**: ``string`` **default**: ``The file could not be uploaded.`` +**type**: ``string`` **default**: ``The file was only partially uploaded.`` -The message that is displayed if the uploaded file could not be uploaded -for some unknown reason. +The message that is displayed if the uploaded file is only partially uploaded. This message has no parameters. -.. include:: /reference/constraints/_payload-option.rst.inc - -.. include:: /reference/constraints/_groups-option.rst.inc - .. _`IANA website`: http://www.iana.org/assignments/media-types/index.html .. _`Wikipedia: Binary prefix`: http://en.wikipedia.org/wiki/Binary_prefix diff --git a/reference/constraints/GreaterThan.rst b/reference/constraints/GreaterThan.rst index 0c283d25fb0..61d83027a72 100644 --- a/reference/constraints/GreaterThan.rst +++ b/reference/constraints/GreaterThan.rst @@ -288,8 +288,6 @@ current time: Options ------- -.. include:: /reference/constraints/_comparison-value-option.rst.inc - .. include:: /reference/constraints/_groups-option.rst.inc message @@ -314,4 +312,6 @@ Parameter Description .. include:: /reference/constraints/_comparison-propertypath-option.rst.inc +.. include:: /reference/constraints/_comparison-value-option.rst.inc + .. _`accepted by the DateTime constructor`: https://php.net/manual/en/datetime.formats.php diff --git a/reference/constraints/GreaterThanOrEqual.rst b/reference/constraints/GreaterThanOrEqual.rst index e28cc43d552..1a4cd4aa5cd 100644 --- a/reference/constraints/GreaterThanOrEqual.rst +++ b/reference/constraints/GreaterThanOrEqual.rst @@ -286,8 +286,6 @@ current time: Options ------- -.. include:: /reference/constraints/_comparison-value-option.rst.inc - .. include:: /reference/constraints/_groups-option.rst.inc message @@ -312,4 +310,6 @@ Parameter Description .. include:: /reference/constraints/_comparison-propertypath-option.rst.inc +.. include:: /reference/constraints/_comparison-value-option.rst.inc + .. _`accepted by the DateTime constructor`: https://php.net/manual/en/datetime.formats.php diff --git a/reference/constraints/IdenticalTo.rst b/reference/constraints/IdenticalTo.rst index 701257f33a2..6ccb15a8eda 100644 --- a/reference/constraints/IdenticalTo.rst +++ b/reference/constraints/IdenticalTo.rst @@ -110,8 +110,6 @@ The following constraints ensure that: Options ------- -.. include:: /reference/constraints/_comparison-value-option.rst.inc - .. include:: /reference/constraints/_groups-option.rst.inc message @@ -134,3 +132,5 @@ Parameter Description .. include:: /reference/constraints/_payload-option.rst.inc .. include:: /reference/constraints/_comparison-propertypath-option.rst.inc + +.. include:: /reference/constraints/_comparison-value-option.rst.inc diff --git a/reference/constraints/Image.rst b/reference/constraints/Image.rst index 332946f476a..fd51b7d8d7f 100644 --- a/reference/constraints/Image.rst +++ b/reference/constraints/Image.rst @@ -24,6 +24,8 @@ Options - `allowLandscape`_ - `groups`_ - `maxHeight`_ - `maxHeightMessage`_ + - `maxPixels`_ + - `maxPixelsMessage`_ - `maxRatio`_ - `maxRatioMessage`_ - `maxWidth`_ @@ -32,6 +34,8 @@ Options - `allowLandscape`_ - `mimeTypesMessage`_ - `minHeight`_ - `minHeightMessage`_ + - `minPixels`_ + - `minPixelsMessage`_ - `minRatio`_ - `minRatioMessage`_ - `minWidth`_ @@ -228,41 +232,100 @@ This constraint shares all of its options with the :doc:`File `] - -This required option is the regular expression pattern that the input will -be matched against. By default, this validator will fail if the input string -does *not* match this regular expression (via the :phpfunction:`preg_match` -PHP function). However, if `match`_ is set to false, then validation will -fail if the input string *does* match this pattern. - .. include:: /reference/constraints/_groups-option.rst.inc htmlPattern @@ -287,4 +276,15 @@ Parameter Description ``{{ value }}`` The current (invalid) value =============== ============================================================== +pattern +~~~~~~~ + +**type**: ``string`` [:ref:`default option `] + +This required option is the regular expression pattern that the input will +be matched against. By default, this validator will fail if the input string +does *not* match this regular expression (via the :phpfunction:`preg_match` +PHP function). However, if `match`_ is set to false, then validation will +fail if the input string *does* match this pattern. + .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/Type.rst b/reference/constraints/Type.rst index b3111cd856e..c89ee2cf9fd 100644 --- a/reference/constraints/Type.rst +++ b/reference/constraints/Type.rst @@ -106,6 +106,26 @@ This will check if ``firstName`` is of type ``string`` and that ``age`` is an Options ------- +.. include:: /reference/constraints/_groups-option.rst.inc + +message +~~~~~~~ + +**type**: ``string`` **default**: ``This value should be of type {{ type }}.`` + +The message if the underlying data is not of the given type. + +You can use the following parameters in this message: + +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ type }}`` The expected type +``{{ value }}`` The current (invalid) value +=============== ============================================================== + +.. include:: /reference/constraints/_payload-option.rst.inc + .. _reference-constraint-type-type: type @@ -151,25 +171,5 @@ Also, you can use ``ctype_()`` functions from corresponding Make sure that the proper :phpfunction:`locale ` is set before using one of these. -.. include:: /reference/constraints/_groups-option.rst.inc - -message -~~~~~~~ - -**type**: ``string`` **default**: ``This value should be of type {{ type }}.`` - -The message if the underlying data is not of the given type. - -You can use the following parameters in this message: - -=============== ============================================================== -Parameter Description -=============== ============================================================== -``{{ type }}`` The expected type -``{{ value }}`` The current (invalid) value -=============== ============================================================== - -.. include:: /reference/constraints/_payload-option.rst.inc - .. _built-in PHP extension: https://php.net/book.ctype.php .. _a list of ctype functions: https://php.net/ref.ctype.php diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index 0527b1428da..59afa7f84e4 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -117,45 +117,6 @@ between all of the constraints in your user table: Options ------- -fields -~~~~~~ - -**type**: ``array`` | ``string`` [:ref:`default option `] - -This required option is the field (or list of fields) on which this entity -should be unique. For example, if you specified both the ``email`` and ``name`` -field in a single ``UniqueEntity`` constraint, then it would enforce that -the combination value is unique (e.g. two users could have the same email, -as long as they don't have the same name also). - -If you need to require two fields to be individually unique (e.g. a unique -``email`` *and* a unique ``username``), you use two ``UniqueEntity`` entries, -each with a single field. - -.. include:: /reference/constraints/_groups-option.rst.inc - -message -~~~~~~~ - -**type**: ``string`` **default**: ``This value is already used.`` - -The message that's displayed when this constraint fails. This message is always -mapped to the first field causing the violation, even when using multiple fields -in the constraint. - -Messages can include the ``{{ value }}`` placeholder to display a string -representation of the invalid entity. If the entity doesn't define the -``__toString()`` method, the following generic value will be used: *"Object of -class __CLASS__ identified by "* - -You can use the following parameters in this message: - -=============== ============================================================== -Parameter Description -=============== ============================================================== -``{{ value }}`` The current (invalid) value -=============== ============================================================== - em ~~ @@ -166,17 +127,6 @@ 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. -repositoryMethod -~~~~~~~~~~~~~~~~ - -**type**: ``string`` **default**: ``findBy`` - -The name of the repository method used to determine the uniqueness. If it's left -blank, ``findBy()`` will be used. The method receives as its argument a -``fieldName => value`` associative array (where ``fieldName`` is each of the -fields configured in the ``fields`` option). The method should return a -`countable PHP variable`_. - entityClass ~~~~~~~~~~~ @@ -286,6 +236,23 @@ Consider this example: Now, the message would be bound to the ``port`` field with this configuration. +fields +~~~~~~ + +**type**: ``array`` | ``string`` [:ref:`default option `] + +This required option is the field (or list of fields) on which this entity +should be unique. For example, if you specified both the ``email`` and ``name`` +field in a single ``UniqueEntity`` constraint, then it would enforce that +the combination value is unique (e.g. two users could have the same email, +as long as they don't have the same name also). + +If you need to require two fields to be individually unique (e.g. a unique +``email`` *and* a unique ``username``), you use two ``UniqueEntity`` entries, +each with a single field. + +.. include:: /reference/constraints/_groups-option.rst.inc + ignoreNull ~~~~~~~~~~ @@ -296,7 +263,40 @@ 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 +~~~~~~~ + +**type**: ``string`` **default**: ``This value is already used.`` + +The message that's displayed when this constraint fails. This message is always +mapped to the first field causing the violation, even when using multiple fields +in the constraint. + +Messages can include the ``{{ value }}`` placeholder to display a string +representation of the invalid entity. If the entity doesn't define the +``__toString()`` method, the following generic value will be used: *"Object of +class __CLASS__ identified by "* + +You can use the following parameters in this message: + +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== + .. include:: /reference/constraints/_payload-option.rst.inc +repositoryMethod +~~~~~~~~~~~~~~~~ + +**type**: ``string`` **default**: ``findBy`` + +The name of the repository method used to determine the uniqueness. If it's left +blank, ``findBy()`` will be used. The method receives as its argument a +``fieldName => value`` associative array (where ``fieldName`` is each of the +fields configured in the ``fields`` option). The method should return a +`countable PHP variable`_. + .. _`race conditions`: https://en.wikipedia.org/wiki/Race_condition .. _`countable PHP variable`: https://php.net/manual/function.is-countable.php diff --git a/reference/constraints/Url.rst b/reference/constraints/Url.rst index 9e1405533e7..aa1d33641ee 100644 --- a/reference/constraints/Url.rst +++ b/reference/constraints/Url.rst @@ -80,22 +80,22 @@ Basic Usage Options ------- -.. include:: /reference/constraints/_groups-option.rst.inc - -message -~~~~~~~ +checkDNS +~~~~~~~~ -**type**: ``string`` **default**: ``This value is not a valid URL.`` +**type**: ``boolean`` **default**: ``false`` -This message is shown if the URL is invalid. +.. versionadded:: 4.1 -You can use the following parameters in this message: + This option was deprecated in Symfony 4.1 and will be removed in Symfony 5.0, + because checking the DNS records is not reliable enough to validate the + existence of the host. Use the :phpfunction:`checkdnsrr` PHP function if you + still want to use this kind of validation. -=============== ============================================================== -Parameter Description -=============== ============================================================== -``{{ value }}`` The current (invalid) value -=============== ============================================================== +By default, this constraint just validates the syntax of the given URL. If you +also need to check whether the associated host exists, set the ``checkDNS`` +option to the value of any of the ``CHECK_DNS_TYPE_*`` constants in the +:class:`Symfony\\Component\\Validator\\Constraints\\Url` class: .. configuration-block:: @@ -110,7 +110,7 @@ Parameter Description { /** * @Assert\Url( - * message = "The url '{{ value }}' is not a valid url", + * checkDNS = "ANY" * ) */ protected $bioUrl; @@ -122,8 +122,7 @@ Parameter Description App\Entity\Author: properties: bioUrl: - - Url: - message: The url "{{ value }}" is not a valid url. + - Url: { checkDNS: 'ANY' } .. code-block:: xml @@ -136,7 +135,7 @@ Parameter Description - + @@ -155,19 +154,28 @@ Parameter Description public static function loadValidatorMetadata(ClassMetadata $metadata) { $metadata->addPropertyConstraint('bioUrl', new Assert\Url([ - 'message' => 'The url "{{ value }}" is not a valid url.', + 'checkDNS' => Assert\Url::CHECK_DNS_TYPE_ANY, ])); } } -protocols -~~~~~~~~~ +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. -**type**: ``array`` **default**: ``['http', 'https']`` +dnsMessage +~~~~~~~~~~ -The protocols considered to be valid for the URL. For example, if you also consider -the ``ftp://`` type URLs to be valid, redefine the ``protocols`` array, listing -``http``, ``https``, and also ``ftp``. +**type**: ``string`` **default**: ``The host could not be resolved.`` + +.. versionadded:: 4.1 + + This option was deprecated in Symfony 4.1 and will be removed in Symfony 5.0, + because checking the DNS records is not reliable enough to validate the + existence of the host. Use the :phpfunction:`checkdnsrr` PHP function if you + still want to use this kind of validation. + +This message is shown when the ``checkDNS`` option is set to ``true`` and the +DNS check failed. .. configuration-block:: @@ -182,7 +190,7 @@ the ``ftp://`` type URLs to be valid, redefine the ``protocols`` array, listing { /** * @Assert\Url( - * protocols = {"http", "https", "ftp"} + * dnsMessage = "The host '{{ value }}' could not be resolved." * ) */ protected $bioUrl; @@ -194,7 +202,7 @@ the ``ftp://`` type URLs to be valid, redefine the ``protocols`` array, listing App\Entity\Author: properties: bioUrl: - - Url: { protocols: [http, https, ftp] } + - Url: { dnsMessage: 'The host "{{ value }}" could not be resolved.' } .. code-block:: xml @@ -207,11 +215,7 @@ the ``ftp://`` type URLs to be valid, redefine the ``protocols`` array, listing - + @@ -230,29 +234,27 @@ the ``ftp://`` type URLs to be valid, redefine the ``protocols`` array, listing public static function loadValidatorMetadata(ClassMetadata $metadata) { $metadata->addPropertyConstraint('bioUrl', new Assert\Url([ - 'protocols' => ['http', 'https', 'ftp'], + 'dnsMessage' => 'The host "{{ value }}" could not be resolved.', ])); } } -.. include:: /reference/constraints/_payload-option.rst.inc +.. include:: /reference/constraints/_groups-option.rst.inc -checkDNS -~~~~~~~~ +message +~~~~~~~ -**type**: ``boolean`` **default**: ``false`` +**type**: ``string`` **default**: ``This value is not a valid URL.`` -.. versionadded:: 4.1 +This message is shown if the URL is invalid. - This option was deprecated in Symfony 4.1 and will be removed in Symfony 5.0, - because checking the DNS records is not reliable enough to validate the - existence of the host. Use the :phpfunction:`checkdnsrr` PHP function if you - still want to use this kind of validation. +You can use the following parameters in this message: -By default, this constraint just validates the syntax of the given URL. If you -also need to check whether the associated host exists, set the ``checkDNS`` -option to the value of any of the ``CHECK_DNS_TYPE_*`` constants in the -:class:`Symfony\\Component\\Validator\\Constraints\\Url` class: +=============== ============================================================== +Parameter Description +=============== ============================================================== +``{{ value }}`` The current (invalid) value +=============== ============================================================== .. configuration-block:: @@ -267,7 +269,7 @@ option to the value of any of the ``CHECK_DNS_TYPE_*`` constants in the { /** * @Assert\Url( - * checkDNS = "ANY" + * message = "The url '{{ value }}' is not a valid url", * ) */ protected $bioUrl; @@ -279,7 +281,8 @@ option to the value of any of the ``CHECK_DNS_TYPE_*`` constants in the App\Entity\Author: properties: bioUrl: - - Url: { checkDNS: 'ANY' } + - Url: + message: The url "{{ value }}" is not a valid url. .. code-block:: xml @@ -292,7 +295,7 @@ option to the value of any of the ``CHECK_DNS_TYPE_*`` constants in the - + @@ -311,28 +314,21 @@ option to the value of any of the ``CHECK_DNS_TYPE_*`` constants in the public static function loadValidatorMetadata(ClassMetadata $metadata) { $metadata->addPropertyConstraint('bioUrl', new Assert\Url([ - 'checkDNS' => Assert\Url::CHECK_DNS_TYPE_ANY, + 'message' => 'The url "{{ value }}" is not a valid url.', ])); } } -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 -~~~~~~~~~~ - -**type**: ``string`` **default**: ``The host could not be resolved.`` +.. include:: /reference/constraints/_payload-option.rst.inc -.. versionadded:: 4.1 +protocols +~~~~~~~~~ - This option was deprecated in Symfony 4.1 and will be removed in Symfony 5.0, - because checking the DNS records is not reliable enough to validate the - existence of the host. Use the :phpfunction:`checkdnsrr` PHP function if you - still want to use this kind of validation. +**type**: ``array`` **default**: ``['http', 'https']`` -This message is shown when the ``checkDNS`` option is set to ``true`` and the -DNS check failed. +The protocols considered to be valid for the URL. For example, if you also consider +the ``ftp://`` type URLs to be valid, redefine the ``protocols`` array, listing +``http``, ``https``, and also ``ftp``. .. configuration-block:: @@ -347,7 +343,7 @@ DNS check failed. { /** * @Assert\Url( - * dnsMessage = "The host '{{ value }}' could not be resolved." + * protocols = {"http", "https", "ftp"} * ) */ protected $bioUrl; @@ -359,7 +355,7 @@ DNS check failed. App\Entity\Author: properties: bioUrl: - - Url: { dnsMessage: 'The host "{{ value }}" could not be resolved.' } + - Url: { protocols: [http, https, ftp] } .. code-block:: xml @@ -372,7 +368,11 @@ DNS check failed. - + @@ -391,7 +391,7 @@ DNS check failed. public static function loadValidatorMetadata(ClassMetadata $metadata) { $metadata->addPropertyConstraint('bioUrl', new Assert\Url([ - 'dnsMessage' => 'The host "{{ value }}" could not be resolved.', + 'protocols' => ['http', 'https', 'ftp'], ])); } } diff --git a/reference/constraints/Uuid.rst b/reference/constraints/Uuid.rst index d570c277ab3..7a009688383 100644 --- a/reference/constraints/Uuid.rst +++ b/reference/constraints/Uuid.rst @@ -98,6 +98,8 @@ Parameter Description ``{{ value }}`` The current (invalid) value =============== ============================================================== +.. include:: /reference/constraints/_payload-option.rst.inc + strict ~~~~~~ @@ -127,8 +129,6 @@ The following PHP constants can also be used: All five versions are allowed by default. -.. include:: /reference/constraints/_payload-option.rst.inc - .. _`Universally unique identifier (UUID)`: http://en.wikipedia.org/wiki/Universally_unique_identifier .. _`RFC 4122`: http://tools.ietf.org/html/rfc4122 .. _`UUID versions`: http://en.wikipedia.org/wiki/Universally_unique_identifier#Variants_and_versions diff --git a/reference/constraints/Valid.rst b/reference/constraints/Valid.rst index 280ae28579f..87fd5a99bc8 100644 --- a/reference/constraints/Valid.rst +++ b/reference/constraints/Valid.rst @@ -255,6 +255,10 @@ the validation of the ``Address`` fields failed. Options ------- +.. include:: /reference/constraints/_groups-option.rst.inc + +.. include:: /reference/constraints/_payload-option.rst.inc + traverse ~~~~~~~~ @@ -263,7 +267,3 @@ traverse If this constraint is applied to a property that holds an array of objects, then each object in that array will be validated only if this option is set to ``true``. - -.. include:: /reference/constraints/_payload-option.rst.inc - -.. include:: /reference/constraints/_groups-option.rst.inc