@@ -36,16 +36,6 @@ If your valid choice list is simple, you can pass them in directly via the
3636
3737.. configuration-block ::
3838
39- .. code-block :: yaml
40-
41- # src/Acme/BlogBundle/Resources/config/validation.yml
42- Acme\BlogBundle\Entity\Author :
43- properties :
44- gender :
45- - Choice :
46- choices : [male, female]
47- message : Choose a valid gender.
48-
4939 .. code-block :: php-annotations
5040
5141 // src/Acme/BlogBundle/Entity/Author.php
@@ -61,6 +51,16 @@ If your valid choice list is simple, you can pass them in directly via the
6151 protected $gender;
6252 }
6353
54+ .. code-block :: yaml
55+
56+ # src/Acme/BlogBundle/Resources/config/validation.yml
57+ Acme\BlogBundle\Entity\Author :
58+ properties :
59+ gender :
60+ - Choice :
61+ choices : [male, female]
62+ message : Choose a valid gender.
63+
6464 .. code-block :: xml
6565
6666 <!-- src/Acme/BlogBundle/Resources/config/validation.xml -->
@@ -129,14 +129,6 @@ constraint.
129129
130130.. configuration-block ::
131131
132- .. code-block :: yaml
133-
134- # src/Acme/BlogBundle/Resources/config/validation.yml
135- Acme\BlogBundle\Entity\Author :
136- properties :
137- gender :
138- - Choice : { callback: getGenders }
139-
140132 .. code-block :: php-annotations
141133
142134 // src/Acme/BlogBundle/Entity/Author.php
@@ -152,6 +144,14 @@ constraint.
152144 protected $gender;
153145 }
154146
147+ .. code-block :: yaml
148+
149+ # src/Acme/BlogBundle/Resources/config/validation.yml
150+ Acme\BlogBundle\Entity\Author :
151+ properties :
152+ gender :
153+ - Choice : { callback: getGenders }
154+
155155 .. code-block :: xml
156156
157157 <!-- src/Acme/BlogBundle/Resources/config/validation.xml -->
@@ -194,14 +194,6 @@ you can pass the class name and the method as an array.
194194
195195.. configuration-block ::
196196
197- .. code-block :: yaml
198-
199- # src/Acme/BlogBundle/Resources/config/validation.yml
200- Acme\BlogBundle\Entity\Author :
201- properties :
202- gender :
203- - Choice : { callback: [Util, getGenders] }
204-
205197 .. code-block :: php-annotations
206198
207199 // src/Acme/BlogBundle/Entity/Author.php
@@ -217,6 +209,14 @@ you can pass the class name and the method as an array.
217209 protected $gender;
218210 }
219211
212+ .. code-block :: yaml
213+
214+ # src/Acme/BlogBundle/Resources/config/validation.yml
215+ Acme\BlogBundle\Entity\Author :
216+ properties :
217+ gender :
218+ - Choice : { callback: [Util, getGenders] }
219+
220220 .. code-block :: xml
221221
222222 <!-- src/Acme/BlogBundle/Resources/config/validation.xml -->
0 commit comments