Skip to content

Commit

Permalink
Show annotations first
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz authored and weaverryan committed Jun 28, 2015
1 parent e3efbbf commit 7ef2e6a
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions reference/constraints/Range.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,6 @@ date must lie within the current year like this:

.. configuration-block::

.. code-block:: yaml
# src/EventBundle/Resources/config/validation.yml
Acme\EventBundle\Entity\Event:
properties:
startDate:
- Range:
min: first day of January
max: first day of January next year
.. code-block:: php-annotations
// src/Acme/SocialBundle/Entity/Event.php
Expand All @@ -137,6 +127,16 @@ date must lie within the current year like this:
protected $startDate;
}
.. code-block:: yaml
# src/EventBundle/Resources/config/validation.yml
Acme\EventBundle\Entity\Event:
properties:
startDate:
- Range:
min: first day of January
max: first day of January next year
.. code-block:: xml
<!-- src/Acme/EventBundle/Resources/config/validation.xml -->
Expand Down Expand Up @@ -179,16 +179,6 @@ dates. If you want to fix the timezone, append it to the date string:

.. configuration-block::

.. code-block:: yaml
# src/EventBundle/Resources/config/validation.yml
Acme\EventBundle\Entity\Event:
properties:
startDate:
- Range:
min: first day of January UTC
max: first day of January next year UTC
.. code-block:: php-annotations
// src/Acme/SocialBundle/Entity/Event.php
Expand All @@ -207,6 +197,16 @@ dates. If you want to fix the timezone, append it to the date string:
protected $startDate;
}
.. code-block:: yaml
# src/EventBundle/Resources/config/validation.yml
Acme\EventBundle\Entity\Event:
properties:
startDate:
- Range:
min: first day of January UTC
max: first day of January next year UTC
.. code-block:: xml
<!-- src/Acme/EventBundle/Resources/config/validation.xml -->
Expand Down Expand Up @@ -249,16 +249,6 @@ can check that a delivery date starts within the next five hours like this:

.. configuration-block::

.. code-block:: yaml
# src/OrderBundle/Resources/config/validation.yml
Acme\OrderBundle\Entity\Order:
properties:
deliveryDate:
- Range:
min: now
max: +5 hours
.. code-block:: php-annotations
// src/Acme/SocialBundle/Entity/Order.php
Expand All @@ -277,6 +267,16 @@ can check that a delivery date starts within the next five hours like this:
protected $deliveryDate;
}
.. code-block:: yaml
# src/OrderBundle/Resources/config/validation.yml
Acme\OrderBundle\Entity\Order:
properties:
deliveryDate:
- Range:
min: now
max: +5 hours
.. code-block:: xml
<!-- src/Acme/OrderBundle/Resources/config/validation.xml -->
Expand Down

0 comments on commit 7ef2e6a

Please sign in to comment.