10000 minor #11101 Sort all validator constraints options (javiereguiluz) · symfony/symfony-docs@17055f0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 17055f0

Browse files
committed
minor #11101 Sort all validator constraints options (javiereguiluz)
This PR was squashed before being merged into the 4.2 branch (closes #11101). Discussion ---------- Sort all validator constraints options This continues #11092 and: simplifies RST tables, sorts option names and option descriptions (and fix some minor issues like missing option names in the tables). It's impossible to review (because git doesn't detect correctly all the moved contents), so I'm going to merge it. Commits ------- 34d8337 Sort all validator constraints options
2 parents 2e73849 + 34d8337 commit 17055f0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1512
-1700
lines changed

reference/constraints/All.rst

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@ All
44
When applied to an array (or Traversable object), this constraint allows
55
you to apply a collection of constraints to each element of the array.
66

7-
+----------------+-------------------------------------------------------------------+
8-
| Applies to | :ref:`property or method <validation-property-target>` |
9-
+----------------+-------------------------------------------------------------------+
10-
| Options | - `constraints`_ |
11-
| | - `groups`_ |
12-
| | - `payload`_ |
13-
+----------------+-------------------------------------------------------------------+
14-
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\All` |
15-
+----------------+-------------------------------------------------------------------+
16-
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\AllValidator` |
17-
+----------------+-------------------------------------------------------------------+
7+
========== ===================================================================
8+
Applies to :ref:`property or method <validation-property-target>`
9+
Options - `constraints`_
10+
- `groups`_
11+
- `payload`_
12+
Class :class:`Symfony\\Component\\Validator\\Constraints\\All`
13+
Validator :class:`Symfony\\Component\\Validator\\Constraints\\AllValidator`
14+
========== ===================================================================
1815

1916
Basic Usage
2017
-----------

reference/constraints/Bic.rst

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,17 @@ This constraint is used to ensure that a value has the proper format of a
66
uniquely identify both financial and non-financial institutions. You may also
77
check that the BIC is associated with a given IBAN.
88

9-
+----------------+-----------------------------------------------------------------------+
10-
| Applies to | :ref:`property or method <validation-property-target>` |
11-
+----------------+-----------------------------------------------------------------------+
12-
| Options | - `groups`_ |
13-
| | - `message`_ |
14-
| | - `payload`_ |
15-
| | - `iban`_ |
16-
| | - `ibanMessage`_ |
17-
| | - `ibanPropertyPath`_ |
18-
+----------------+-----------------------------------------------------------------------+
19-
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Bic` |
20-
+----------------+-----------------------------------------------------------------------+
21-
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\BicValidator` |
22-
+----------------+-----------------------------------------------------------------------+
9+
========== ===================================================================
10+
Applies to :ref:`property or method <validation-property-target>`
11+
Options - `groups`_
12+
- `iban`_
13+
- `ibanMessage`_
14+
- `ibanPropertyPath`_
15+
- `message`_
16+
- `payload`_
17+
Class :class:`Symfony\\Component\\Validator\\Constraints\\Bic`
18+
Validator :class:`Symfony\\Component\\Validator\\Constraints\\BicValidator`
19+
========== ===================================================================
2320

2421
Basic Usage
2522
-----------
@@ -92,23 +89,6 @@ Available Options
9289

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

95-
message
96-
~~~~~~~
97-
98-
**type**: ``string`` **default**: ``This is not a valid Business Identifier Code (BIC).``
99-
100-
The default message supplied when the value does not pass the BIC check.
101-
102-
You can use the following parameters in this message:
103-
104-
+------------------+------------------------------------------------+
105-
| Parameter | Description |
106-
+==================+================================================+
107-
| ``{{ value }}`` | The current (invalid) BIC value |
108-
+------------------+------------------------------------------------+
109-
110-
.. include:: /reference/constraints/_payload-option.rst.inc
111-
11292
iban
11393
~~~~
11494

@@ -134,4 +114,21 @@ For example, if you want to compare the ``$bic`` property of some object
134114
with regard to the ``$iban`` property of the same object, use
135115
``propertyPath="iban"`` in the comparison constraint of ``$bic``.
136116

117+
message
118+
~~~~~~~
119+
120+
**type**: ``string`` **default**: ``This is not a valid Business Identifier Code (BIC).``
121+
122+
The default message supplied when the value does not pass the BIC check.
123+
124+
You can use the following parameters in this message:
125+
126+
=============== ==============================================================
127+
Parameter Description
128+
=============== ==============================================================
129+
``{{ value }}`` The current (invalid) BIC value
130+
=============== ==============================================================
131+
132+
.. include:: /reference/constraints/_payload-option.rst.inc
133+
137134
.. _`Business Identifier Code (BIC)`: https://en.wikipedia.org/wiki/Business_Identifier_Code

reference/constraints/Blank.rst

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,14 @@ To force that a value strictly be equal to ``null``, see the
1313
To force that a value is *not* blank, see :doc:`/reference/constraints/NotBlank`.
1414
But be careful as ``NotBlank`` is *not* strictly the opposite of ``Blank``.
1515

16-
+----------------+---------------------------------------------------------------------+
17-
| Applies to | :ref:`property or method <validation-property-target>` |
18-
+----------------+---------------------------------------------------------------------+
19-
| Options | - `groups`_ |
20-
| | - `message`_ |
21-
| | - `payload`_ |
22-
+----------------+---------------------------------------------------------------------+
23-
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Blank` |
24-
+----------------+---------------------------------------------------------------------+
25-
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\BlankValidator` |
26-
+----------------+---------------------------------------------------------------------+
16+
========== ===================================================================
17+
Applies to :ref:`property or method <validation-property-target>`
18+
Options - `groups`_
19+
- `message`_
20+
- `payload`_
21+
Class :class:`Symfony\\Component\\Validator\\Constraints\\Blank`
22+
Validator :class:`Symfony\\Component\\Validator\\Constraints\\BlankValidator`
23+
========== ===================================================================
2724

2825
Basic Usage
2926
-----------
@@ -101,10 +98,10 @@ This is the message that will be shown if the value is not blank.
10198

10299
You can use the following parameters in this message:
103100

104-
+------------------+------------------------------------------------+
105-
| Parameter | Description |
106-
+==================+================================================+
107-
| ``{{ value }}`` | The current (invalid) value |
108-
+------------------+------------------------------------------------+
101+
=============== ==============================================================
102+
Parameter Description
103+
=============== ==============================================================
104+
``{{ value }}`` The current (invalid) value
105+
=============== ==============================================================
109106

110107
.. include:: /reference/constraints/_payload-option.rst.inc

reference/constraints/Callback.rst

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,14 @@ can do anything, including creating and assigning validation errors.
1717
as you'll see in the example, a callback method has the ability to directly
1818
add validator "violations".
1919

20-
+----------------+------------------------------------------------------------------------+
21-
| Applies to | :ref:`class <validation-class-target>` |
22-
+----------------+------------------------------------------------------------------------+
23-
| Options | - :ref:`callback <callback-option>` |
24-
| | - `groups`_ |
25-
| | - `payload`_ |
26-
+----------------+------------------------------------------------------------------------+
27-
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Callback` |
28-
+----------------+------------------------------------------------------------------------+
29-
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CallbackValidator` |
30-
+----------------+------------------------------------------------------------------------+
20+
========== ===================================================================
21+
Applies to :ref:`class <validation-class-target>`
22+
Options - :ref:`callback <callback-option>`
23+
- `groups`_
24+
- `payload`_
25+
Class :class:`Symfony\\Component\\Validator\\Constraints\\Callback`
26+
Validator :class:`Symfony\\Component\\Validator\\Constraints\\CallbackValidator`
27+
========== ===================================================================
3128

3229
Configuration
3330
-------------

reference/constraints/CardScheme.rst

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,15 @@ This constraint ensures that a credit card number is valid for a given credit
55
card company. It can be used to validate the number before trying to initiate
66
a payment through a payment gateway.
77

8-
+----------------+--------------------------------------------------------------------------+
9-
| Applies to | :ref:`property or method <validation-property-target>` |
10-
+----------------+--------------------------------------------------------------------------+
11-
| Options | - `groups`_ |
12-
| | - `schemes`_ |
13-
| | - `message`_ |
14-
| | - `payload`_ |
15-
+----------------+--------------------------------------------------------------------------+
16-
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\CardScheme` |
17-
+----------------+--------------------------------------------------------------------------+
18-
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CardSchemeValidator` |
19-
+----------------+--------------------------------------------------------------------------+
8+
========== ===================================================================
9+
Applies to :ref:`property or method <validation-property-target>`
10+
Options - `groups`_
11+
- `message`_
12+
- `payload`_
13+
- `schemes`_
14+
Class :class:`Symfony\\Component\\Validator\\Constraints\\CardScheme`
15+
Validator :class:`Symfony\\Component\\Validator\\Constraints\\CardSchemeValidator`
16+
========== ===================================================================
2017

2118
Basic Usage
2219
-----------
@@ -104,6 +101,23 @@ Available Options
104101

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

104+
message
105+
~~~~~~~
106+
107+
**type**: ``string`` **default**: ``Unsupported card type or invalid card number.``
108+
109+
The message shown when the value does not pass the ``CardScheme`` check.
110+
111+
You can use the following parameters in this message:
112+
113+
=============== ==============================================================
114+
Parameter Description
115+
=============== ==============================================================
116+
``{{ value }}`` The current (invalid) value
117+
=============== ==============================================================
118+
119+
.. include:: /reference/constraints/_payload-option.rst.inc
120+
107121
schemes
108122
~~~~~~~
109123

@@ -132,21 +146,4 @@ Valid values are:
132146
For more information about the used schemes, see
133147
`Wikipedia: Issuer identification number (IIN)`_.
134148

135-
message
136-
~~~~~~~
137-
138-
**type**: ``string`` **default**: ``Unsupported card type or invalid card number.``
139-
140-
The message shown when the value does not pass the ``CardScheme`` check.
141-
142-
You can use the following parameters in this message:
143-
144-
+------------------+------------------------------------------------+
145-
| Parameter | Description |
146-
+==================+================================================+
147-
| ``{{ value }}`` | The current (invalid) value |
148-
+------------------+------------------------------------------------+
149-
150-
.. include:: /reference/constraints/_payload-option.rst.inc
151-
152149
.. _`Wikipedia: Issuer identification number (IIN)`: https://en.wikipedia.org/wiki/Bank_card_number#Issuer_identification_number_.28IIN.29

0 commit comments

Comments
 (0)
0