Skip to content

Commit 7ef2e6a

Browse files
javiereguiluzweaverryan
authored andcommitted
Show annotations first
1 parent e3efbbf commit 7ef2e6a

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

reference/constraints/Range.rst

+30-30
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,6 @@ date must lie within the current year like this:
109109

110110
.. configuration-block::
111111

112-
.. code-block:: yaml
113-
114-
# src/EventBundle/Resources/config/validation.yml
115-
Acme\EventBundle\Entity\Event:
116-
properties:
117-
startDate:
118-
- Range:
119-
min: first day of January
120-
max: first day of January next year
121-
122112
.. code-block:: php-annotations
123113
124114
// src/Acme/SocialBundle/Entity/Event.php
@@ -137,6 +127,16 @@ date must lie within the current year like this:
137127
protected $startDate;
138128
}
139129
130+
.. code-block:: yaml
131+
132+
# src/EventBundle/Resources/config/validation.yml
133+
Acme\EventBundle\Entity\Event:
134+
properties:
135+
startDate:
136+
- Range:
137+
min: first day of January
138+
max: first day of January next year
139+
140140
.. code-block:: xml
141141
142142
<!-- src/Acme/EventBundle/Resources/config/validation.xml -->
@@ -179,16 +179,6 @@ dates. If you want to fix the timezone, append it to the date string:
179179

180180
.. configuration-block::
181181

182-
.. code-block:: yaml
183-
184-
# src/EventBundle/Resources/config/validation.yml
185-
Acme\EventBundle\Entity\Event:
186-
properties:
187-
startDate:
188-
- Range:
189-
min: first day of January UTC
190-
max: first day of January next year UTC
191-
192182
.. code-block:: php-annotations
193183
194184
// src/Acme/SocialBundle/Entity/Event.php
@@ -207,6 +197,16 @@ dates. If you want to fix the timezone, append it to the date string:
207197
protected $startDate;
208198
}
209199
200+
.. code-block:: yaml
201+
202+
# src/EventBundle/Resources/config/validation.yml
203+
Acme\EventBundle\Entity\Event:
204+
properties:
205+
startDate:
206+
- Range:
207+
min: first day of January UTC
208+
max: first day of January next year UTC
209+
210210
.. code-block:: xml
211211
212212
<!-- src/Acme/EventBundle/Resources/config/validation.xml -->
@@ -249,16 +249,6 @@ can check that a delivery date starts within the next five hours like this:
249249

250250
.. configuration-block::
251251

252-
.. code-block:: yaml
253-
254-
# src/OrderBundle/Resources/config/validation.yml
255-
Acme\OrderBundle\Entity\Order:
256-
properties:
257-
deliveryDate:
258-
- Range:
259-
min: now
260-
max: +5 hours
261-
262252
.. code-block:: php-annotations
263253
264254
// src/Acme/SocialBundle/Entity/Order.php
@@ -277,6 +267,16 @@ can check that a delivery date starts within the next five hours like this:
277267
protected $deliveryDate;
278268
}
279269
270+
.. code-block:: yaml
271+
272+
# src/OrderBundle/Resources/config/validation.yml
273+
Acme\OrderBundle\Entity\Order:
274+
properties:
275+
deliveryDate:
276+
- Range:
277+
min: now
278+
max: +5 hours
279+
280280
.. code-block:: xml
281281
282282
<!-- src/Acme/OrderBundle/Resources/config/validation.xml -->

0 commit comments

Comments
 (0)