@@ -38,8 +38,8 @@ you might add the following:
3838 -Count :
3939min :1
4040max :5
41- minMessage :You must specify at least one email
42- maxMessage :You cannot specify more than5 emails
41+ minMessage :" You must specify at least one email"
42+ maxMessage :" You cannot specify more than{{ limit }} emails"
4343
4444 ..code-block ::php-annotations
4545
@@ -53,12 +53,27 @@ you might add the following:
5353 * min = "1",
5454 * max = "5",
5555 * minMessage = "You must specify at least one email",
56- * maxMessage = "You cannot specify more than5 emails"
56+ * maxMessage = "You cannot specify more than{{ limit }} emails"
5757 * )
5858 */
5959 protected $emails = array();
6060 }
6161
62+ ..code-block ::xml
63+
64+ <!-- src/Acme/EventBundle/Resources/config/validation.xml-->
65+ <class name =" Acme\EventBundle\Entity\Participant" >
66+ <property name =" emails" >
67+ <constraint name =" Count" >
68+ <option name =" min" >1</option >
69+ <option name =" max" >5</option >
70+ <option name =" minMessage" >You must specify at least one email</option >
71+ <option name =" maxMessage" >You cannot specify more than {{ limit }} emails</option >
72+ </constraint >
73+ </property >
74+ </class >
75+
76+
6277 Options
6378-------
6479