Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit feb9b22

Browse files
committed
[symfony#1864] Removing a couple more references to duplicated constraints and marking them as deprecated
1 parent cb9c9d1 commit feb9b22

File tree

6 files changed

+26
-2
lines changed

6 files changed

+26
-2
lines changed

reference/constraints/Collection.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This constraint is used when the underlying data is a collection (i.e. an
55
array or an object that implements ``Traversable`` and ``ArrayAccess``),
66
but you'd like to validate different keys of that collection in different
77
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.
99

1010
This constraint can also make sure that certain collection keys are present
1111
and that extra keys are not present.

reference/constraints/Max.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Max
22
===
33

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+
410
Validates that a given number is *less* than some maximum number.
511

612
+----------------+--------------------------------------------------------------------+

reference/constraints/MaxLength.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
MaxLength
22
=========
33

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+
410
Validates that the length of a string is not larger than the given limit.
511

612
+----------------+-------------------------------------------------------------------------+

reference/constraints/Min.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Min
22
===
33

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+
410
Validates that a given number is *greater* than some minimum number.
511

612
+----------------+--------------------------------------------------------------------+

reference/constraints/MinLength.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
MinLength
22
=========
33

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+
410
Validates that the length of a string is at least as long as the given limit.
511

612
+----------------+-------------------------------------------------------------------------+

reference/constraints/Valid.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ an ``Address`` instance in the ``$address`` property.
103103
104104
/**
105105
* @Assert\NotBlank
106-
* @Assert\MaxLength(max = "5")
106+
* @Assert\Length(max = "5")
107107
*/
108108
protected $zipCode;
109109
}

0 commit comments

Comments
 (0)