Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 70cd54b

Browse filesBrowse files
committed
[validation] Increasing visibility of constraints on the validation chapter
1 parent 13a8fdd commit 70cd54b
Copy full SHA for 70cd54b

File tree

Expand file treeCollapse file tree

3 files changed

+66
-62
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+66
-62
lines changed

‎book/validation.rst

Copy file name to clipboardExpand all lines: book/validation.rst
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,12 @@ adheres to the rules of the constraint.
299299
Supported Constraints
300300
~~~~~~~~~~~~~~~~~~~~~
301301

302-
Symfony2 packages a large number of the most commonly-needed constraints.
303-
The full list of constraints with details is available in the
304-
:doc:`constraints reference section</reference/constraints>`.
302+
Symfony2 packages a large number of the most commonly-needed constraints:
303+
304+
.. include:: /reference/constraints/map.rst.inc
305+
306+
You can also create your own custom constraints. This topic is covered in
307+
the ":doc:`/cookbook/validation/custom_constraint`" article of the cookbook.
305308

306309
.. index::
307310
single: Validation; Constraints configuration

‎reference/constraints.rst

Copy file name to clipboardExpand all lines: reference/constraints.rst
+1-59Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -51,62 +51,4 @@ Supported Constraints
5151

5252
The following constraints are natively available in Symfony2:
5353

54-
Basic Constraints
55-
~~~~~~~~~~~~~~~~~
56-
57-
These are the basic constraints: use them to assert very basic things about
58-
the value of properties or the return value of methods on your object.
59-
60-
* :doc:`NotBlank <constraints/NotBlank>`
61-
* :doc:`Blank <constraints/Blank>`
62-
* :doc:`NotNull <constraints/NotNull>`
63-
* :doc:`Null <constraints/Null>`
64-
* :doc:`True <constraints/True>`
65-
* :doc:`False <constraints/False>`
66-
* :doc:`Type <constraints/Type>`
67-
68-
String Constraints
69-
~~~~~~~~~~~~~~~~~~
70-
71-
* :doc:`Email <constraints/Email>`
72-
* :doc:`MinLength <constraints/MinLength>`
73-
* :doc:`MaxLength <constraints/MaxLength>`
74-
* :doc:`Url <constraints/Url>`
75-
* :doc:`Regex <constraints/Regex>`
76-
* :doc:`Ip <constraints/Ip>`
77-
78-
Number Constraints
79-
~~~~~~~~~~~~~~~~~~
80-
81-
* :doc:`Max <constraints/Max>`
82-
* :doc:`Min <constraints/Min>`
83-
84-
Date Constraints
85-
~~~~~~~~~~~~~~~~
86-
87-
* :doc:`Date <constraints/Date>`
88-
* :doc:`DateTime <constraints/DateTime>`
89-
* :doc:`Time <constraints/Time>`
90-
91-
Collection Constraints
92-
~~~~~~~~~~~~~~~~~~~~~~
93-
94-
* :doc:`Choice <constraints/Choice>`
95-
* :doc:`Collection <constraints/Collection>`
96-
* :doc:`UniqueEntity <constraints/UniqueEntity>`
97-
* :doc:`Language <constraints/Language>`
98-
* :doc:`Locale <constraints/Locale>`
99-
* :doc:`Country <constraints/Country>`
100-
101-
File Constraints
102-
~~~~~~~~~~~~~~~~
103-
104-
* :doc:`File <constraints/File>`
105-
* :doc:`Image <constraints/Image>`
106-
107-
Other Constraints
108-
~~~~~~~~~~~~~~~~~
109-
110-
* :doc:`Callback <constraints/Callback>`
111-
* :doc:`All <constraints/All>`
112-
* :doc:`Valid <constraints/Valid>`
54+
.. include:: /reference/forms/types/map.rst.inc

‎reference/constraints/map.rst.inc

Copy file name to clipboard
+59Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Basic Constraints
2+
~~~~~~~~~~~~~~~~~
3+
4+
These are the basic constraints: use them to assert very basic things about
5+
the value of properties or the return value of methods on your object.
6+
7+
* :doc:`NotBlank </reference/constraints/NotBlank>`
8+
* :doc:`Blank </reference/constraints/Blank>`
9+
* :doc:`NotNull </reference/constraints/NotNull>`
10+
* :doc:`Null </reference/constraints/Null>`
11+
* :doc:`True </reference/constraints/True>`
12+
* :doc:`False </reference/constraints/False>`
13+
* :doc:`Type </reference/constraints/Type>`
14+
15+
String Constraints
16+
~~~~~~~~~~~~~~~~~~
17+
18+
* :doc:`Email </reference/constraints/Email>`
19+
* :doc:`MinLength </reference/constraints/MinLength>`
20+
* :doc:`MaxLength </reference/constraints/MaxLength>`
21+
* :doc:`Url </reference/constraints/Url>`
22+
* :doc:`Regex </reference/constraints/Regex>`
23+
* :doc:`Ip </reference/constraints/Ip>`
24+
25+
Number Constraints
26+
~~~~~~~~~~~~~~~~~~
27+
28+
* :doc:`Max </reference/constraints/Max>`
29+
* :doc:`Min </reference/constraints/Min>`
30+
31+
Date Constraints
32+
~~~~~~~~~~~~~~~~
33+
34+
* :doc:`Date </reference/constraints/Date>`
35+
* :doc:`DateTime </reference/constraints/DateTime>`
36+
* :doc:`Time </reference/constraints/Time>`
37+
38+
Collection Constraints
39+
~~~~~~~~~~~~~~~~~~~~~~
40+
41+
* :doc:`Choice </reference/constraints/Choice>`
42+
* :doc:`Collection </reference/constraints/Collection>`
43+
* :doc:`UniqueEntity </reference/constraints/UniqueEntity>`
44+
* :doc:`Language </reference/constraints/Language>`
45+
* :doc:`Locale </reference/constraints/Locale>`
46+
* :doc:`Country </reference/constraints/Country>`
47+
48+
File Constraints
49+
~~~~~~~~~~~~~~~~
50+
51+
* :doc:`File </reference/constraints/File>`
52+
* :doc:`Image </reference/constraints/Image>`
53+
54+
Other Constraints
55+
~~~~~~~~~~~~~~~~~
56+
57+
* :doc:`Callback </reference/constraints/Callback>`
58+
* :doc:`All </reference/constraints/All>`
59+
* :doc:`Valid </reference/constraints/Valid>`

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.