File tree Expand file tree Collapse file tree 6 files changed +26
-2
lines changed Expand file tree Collapse file tree 6 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ This constraint is used when the underlying data is a collection (i.e. an
5
5
array or an object that implements ``Traversable `` and ``ArrayAccess ``),
6
6
but you'd like to validate different keys of that collection in different
7
7
ways. For example, you might validate the ``email `` key using the ``Email ``
8
- constraint and the ``inventory `` key of the collection with the ``Min `` constraint.
8
+ constraint and the ``inventory `` key of the collection with the ``Range `` constraint.
9
9
10
10
This constraint can also make sure that certain collection keys are present
11
11
and that extra keys are not present.
Original file line number Diff line number Diff line change 1
1
Max
2
2
===
3
3
4
+ .. caution ::
5
+
6
+ The Max constraint is deprecated since version 2.1 and will be removed
7
+ in Symfony 2.3. Use :doc: `/reference/constraints/Range ` with the ``max ``
8
+ option instead.
9
+
4
10
Validates that a given number is *less * than some maximum number.
5
11
6
12
+----------------+--------------------------------------------------------------------+
Original file line number Diff line number Diff line change 1
1
MaxLength
2
2
=========
3
3
4
+ .. caution ::
5
+
6
+ The MaxLength constraint is deprecated since version 2.1 and will be removed
7
+ in Symfony 2.3. Use :doc: `/reference/constraints/Length ` with the ``max ``
8
+ option instead.
9
+
4
10
Validates that the length of a string is not larger than the given limit.
5
11
6
12
+----------------+-------------------------------------------------------------------------+
Original file line number Diff line number Diff line change 1
1
Min
2
2
===
3
3
4
+ .. caution ::
5
+
6
+ The Min constraint is deprecated since version 2.1 and will be removed
7
+ in Symfony 2.3. Use :doc: `/reference/constraints/Range ` with the ``min ``
8
+ option instead.
9
+
4
10
Validates that a given number is *greater * than some minimum number.
5
11
6
12
+----------------+--------------------------------------------------------------------+
Original file line number Diff line number Diff line change 1
1
MinLength
2
2
=========
3
3
4
+ .. caution ::
5
+
6
+ The MinLength constraint is deprecated since version 2.1 and will be removed
7
+ in Symfony 2.3. Use :doc: `/reference/constraints/Length ` with the ``min ``
8
+ option instead.
9
+
4
10
Validates that the length of a string is at least as long as the given limit.
5
11
6
12
+----------------+-------------------------------------------------------------------------+
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ an ``Address`` instance in the ``$address`` property.
103
103
104
104
/**
105
105
* @Assert\NotBlank
106
- * @Assert\MaxLength (max = "5")
106
+ * @Assert\Length (max = "5")
107
107
*/
108
108
protected $zipCode;
109
109
}
You can’t perform that action at this time.
0 commit comments