Skip to content

Added the docs for the "groups" constraint option #11092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions reference/constraints/All.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ you to apply a collection of constraints to each element of the array.
+----------------+-------------------------------------------------------------------+
| Options | - `constraints`_ |
| | - `payload`_ |
| | - `groups`_ |
+----------------+-------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\All` |
+----------------+-------------------------------------------------------------------+
Expand Down Expand Up @@ -101,6 +102,8 @@ be blank and to be at least 5 characters long.
Options
-------

.. include:: /reference/constraints/_groups-option.rst.inc

constraints
~~~~~~~~~~~

Expand Down
5 changes: 4 additions & 1 deletion reference/constraints/Bic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ uniquely identify both financial and non-financial institutions.
+----------------+-----------------------------------------------------------------------+
| Applies to | :ref:`property or method <validation-property-target>` |
+----------------+-----------------------------------------------------------------------+
| Options | - `message`_ |
| Options | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
+----------------+-----------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Bic` |
Expand Down Expand Up @@ -85,6 +86,8 @@ will contain a Business Identifier Code (BIC).
Available Options
-----------------

.. include:: /reference/constraints/_groups-option.rst.inc

message
~~~~~~~

Expand Down
5 changes: 4 additions & 1 deletion reference/constraints/Blank.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ But be careful as ``NotBlank`` is *not* strictly the opposite of ``Blank``.
+----------------+---------------------------------------------------------------------+
| Applies to | :ref:`property or method <validation-property-target>` |
+----------------+---------------------------------------------------------------------+
| Options | - `message`_ |
| Options | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
+----------------+---------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Blank` |
Expand Down Expand Up @@ -89,6 +90,8 @@ of an ``Author`` class were blank, you could do the following:
Options
-------

.. include:: /reference/constraints/_groups-option.rst.inc

message
~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/Callback.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ can do anything, including creating and assigning validation errors.
| Applies to | :ref:`class <validation-class-target>` |
+----------------+------------------------------------------------------------------------+
| Options | - :ref:`callback <callback-option>` |
| | - `groups`_ |
| | - `payload`_ |
+----------------+------------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Callback` |
Expand Down Expand Up @@ -252,6 +253,8 @@ constructor of the Callback constraint::
Options
-------

.. include:: /reference/constraints/_groups-option.rst.inc

.. _callback-option:

callback
Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/CardScheme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ a payment through a payment gateway.
| Applies to | :ref:`property or method <validation-property-target>` |
+----------------+--------------------------------------------------------------------------+
| Options | - `schemes`_ |
| | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
+----------------+--------------------------------------------------------------------------+
Expand Down Expand Up @@ -101,6 +102,8 @@ on an object that will contain a credit card number.
Available Options
-----------------

.. include:: /reference/constraints/_groups-option.rst.inc

schemes
~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/Choice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ an array of items is one of those valid choices.
+----------------+----------------------------------------------------------------------+
| Options | - `choices`_ |
| | - `callback`_ |
| | - `groups`_ |
| | - `multiple`_ |
| | - `min`_ |
| | - `max`_ |
Expand Down Expand Up @@ -282,6 +283,8 @@ you can pass the class name and the method as an array.
Available Options
-----------------

.. include:: /reference/constraints/_groups-option.rst.inc

choices
~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/Collection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and that extra keys are not present.
| | - `allowMissingFields`_ |
| | - `missingFieldsMessage`_ |
| | - `payload`_ |
| | - `groups`_ |
+----------------+--------------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Collection` |
+----------------+--------------------------------------------------------------------------+
Expand Down Expand Up @@ -289,6 +290,8 @@ the ``NotBlank`` constraint will still be applied (since it is wrapped in
Options
-------

.. include:: /reference/constraints/_groups-option.rst.inc

fields
~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/Count.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Countable) element count is *between* some minimum and maximum value.
| | - `maxMessage`_ |
| | - `exactMessage`_ |
| | - `payload`_ |
| | - `groups`_ |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same and below

+----------------+---------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Count` |
+----------------+---------------------------------------------------------------------+
Expand Down Expand Up @@ -103,6 +104,8 @@ you might add the following:
Options
-------

.. include:: /reference/constraints/_groups-option.rst.inc

min
~~~

Expand Down
5 changes: 4 additions & 1 deletion reference/constraints/Country.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Validates that a value is a valid `ISO 3166-1 alpha-2`_ country code.
+----------------+------------------------------------------------------------------------+
| Applies to | :ref:`property or method <validation-property-target>` |
+----------------+------------------------------------------------------------------------+
| Options | - `message`_ |
| Options | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
+----------------+------------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Country` |
Expand Down Expand Up @@ -78,6 +79,8 @@ Basic Usage
Options
-------

.. include:: /reference/constraints/_groups-option.rst.inc

message
~~~~~~~

Expand Down
5 changes: 4 additions & 1 deletion reference/constraints/Currency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Validates that a value is a valid `3-letter ISO 4217`_ currency name.
+----------------+---------------------------------------------------------------------------+
| Applies to | :ref:`property or method<validation-property-target>` |
+----------------+---------------------------------------------------------------------------+
| Options | - `message`_ |
| Options | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
+----------------+---------------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Currency` |
Expand Down Expand Up @@ -81,6 +82,8 @@ a valid currency, you could do the following:
Options
-------

.. include:: /reference/constraints/_groups-option.rst.inc

message
~~~~~~~

Expand Down
5 changes: 4 additions & 1 deletion reference/constraints/Date.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ valid YYYY-MM-DD format.
+----------------+--------------------------------------------------------------------+
| Applies to | :ref:`property or method <validation-property-target>` |
+----------------+--------------------------------------------------------------------+
| Options | - `message`_ |
| Options | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
+----------------+--------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Date` |
Expand Down Expand Up @@ -80,6 +81,8 @@ Basic Usage
Options
-------

.. include:: /reference/constraints/_groups-option.rst.inc

message
~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/DateTime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ a specific format.
| Applies to | :ref:`property or method <validation-property-target>` |
+----------------+------------------------------------------------------------------------+
| Options | - `format`_ |
| | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
+----------------+------------------------------------------------------------------------+
Expand Down Expand Up @@ -89,6 +90,8 @@ format
This option allows to validate a custom date format. See
:phpmethod:`DateTime::createFromFormat` for formatting options.

.. include:: /reference/constraints/_groups-option.rst.inc

message
~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/Email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ cast to a string before being validated.
| | - `checkMX`_ |
| | - `checkHost`_ |
| | - `payload`_ |
| | - `groups`_ |
+----------------+---------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Email` |
+----------------+---------------------------------------------------------------------+
Expand Down Expand Up @@ -93,6 +94,8 @@ Basic Usage
Options
-------

.. include:: /reference/constraints/_groups-option.rst.inc

strict
~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/EqualTo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ To force that a value is *not* equal, see :doc:`/reference/constraints/NotEqualT
| Applies to | :ref:`property or method<validation-property-target>` |
+----------------+-----------------------------------------------------------------------+
| Options | - `value`_ |
| | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
| | - `propertyPath`_ |
Expand Down Expand Up @@ -111,6 +112,8 @@ Options

.. include:: /reference/constraints/_comparison-value-option.rst.inc

.. include:: /reference/constraints/_groups-option.rst.inc

message
~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/Expression.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ gives you similar flexibility.
| Applies to | :ref:`class <validation-class-target>` or :ref:`property/method <validation-property-target>` |
+----------------+-----------------------------------------------------------------------------------------------+
| Options | - :ref:`expression <reference-constraint-expression-option>` |
| | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
+----------------+-----------------------------------------------------------------------------------------------+
Expand Down Expand Up @@ -245,6 +246,8 @@ in your expression:
* ``value``: The value of the property being validated (only available when
the constraint is applied directly to a property);

.. include:: /reference/constraints/_groups-option.rst.inc

message
~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/File.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ form field.
| | - `uploadExtensionErrorMessage`_ |
| | - `uploadErrorMessage`_ |
| | - `payload`_ |
| | - `groups`_ |
+----------------+---------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\File` |
+----------------+---------------------------------------------------------------------+
Expand Down Expand Up @@ -388,5 +389,7 @@ 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
3 changes: 3 additions & 0 deletions reference/constraints/GreaterThan.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ than another value, see :doc:`/reference/constraints/LessThan`.
| Applies to | :ref:`property or method<validation-property-target>` |
+----------------+---------------------------------------------------------------------------+
| Options | - `value`_ |
| | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
| | - `propertyPath`_ |
Expand Down Expand Up @@ -292,6 +293,8 @@ Options

.. include:: /reference/constraints/_comparison-value-option.rst.inc

.. include:: /reference/constraints/_groups-option.rst.inc

message
~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/GreaterThanOrEqual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ the options. To force that a value is greater than another value, see
| Applies to | :ref:`property or method<validation-property-target>` |
+----------------+----------------------------------------------------------------------------------+
| Options | - `value`_ |
| | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
| | - `propertyPath`_ |
Expand Down Expand Up @@ -290,6 +291,8 @@ Options

.. include:: /reference/constraints/_comparison-value-option.rst.inc

.. include:: /reference/constraints/_groups-option.rst.inc

message
~~~~~~~

Expand Down
5 changes: 4 additions & 1 deletion reference/constraints/Iban.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ borders with a reduced risk of propagating transcription errors.
+----------------+-----------------------------------------------------------------------+
| Applies to | :ref:`property or method<validation-property-target>` |
+----------------+-----------------------------------------------------------------------+
| Options | - `message`_ |
| Options | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
+----------------+-----------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Iban` |
Expand Down Expand Up @@ -95,6 +96,8 @@ will contain an International Bank Account Number.
Available Options
-----------------

.. include:: /reference/constraints/_groups-option.rst.inc

message
~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/IdenticalTo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ To force that a value is *not* identical, see
| Applies to | :ref:`property or method<validation-property-target>` |
+----------------+--------------------------------------------------------------------------+
| Options | - `value`_ |
| | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
| | - `propertyPath`_ |
Expand Down Expand Up @@ -114,6 +115,8 @@ Options

.. include:: /reference/constraints/_comparison-value-option.rst.inc

.. include:: /reference/constraints/_groups-option.rst.inc

message
~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions reference/constraints/Image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ of the documentation on this constraint.
| | - `allowPortraitMessage`_ |
| | - `corruptedMessage`_ |
| | - See :doc:`File </reference/constraints/File>` for inherited options |
| | - `groups`_ |
+----------------+-----------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Image` |
+----------------+-----------------------------------------------------------------------+
Expand Down Expand Up @@ -581,5 +582,7 @@ is corrupted.

This message has no parameters.

.. include:: /reference/constraints/_groups-option.rst.inc

.. _`IANA website`: http://www.iana.org/assignments/media-types/image/index.html
.. _`PHP GD extension`: http://php.net/manual/en/book.image.php
Loading