Skip to content

Commit

Permalink
[validation] Increasing visibility of constraints on the validation c…
Browse files Browse the repository at this point in the history
…hapter
  • Loading branch information
weaverryan committed Sep 30, 2011
1 parent 13a8fdd commit 70cd54b
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 62 deletions.
9 changes: 6 additions & 3 deletions book/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,12 @@ adheres to the rules of the constraint.
Supported Constraints
~~~~~~~~~~~~~~~~~~~~~

Symfony2 packages a large number of the most commonly-needed constraints.
The full list of constraints with details is available in the
:doc:`constraints reference section</reference/constraints>`.
Symfony2 packages a large number of the most commonly-needed constraints:

.. include:: /reference/constraints/map.rst.inc

You can also create your own custom constraints. This topic is covered in
the ":doc:`/cookbook/validation/custom_constraint`" article of the cookbook.

.. index::
single: Validation; Constraints configuration
Expand Down
60 changes: 1 addition & 59 deletions reference/constraints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,62 +51,4 @@ Supported Constraints

The following constraints are natively available in Symfony2:

Basic Constraints
~~~~~~~~~~~~~~~~~

These are the basic constraints: use them to assert very basic things about
the value of properties or the return value of methods on your object.

* :doc:`NotBlank <constraints/NotBlank>`
* :doc:`Blank <constraints/Blank>`
* :doc:`NotNull <constraints/NotNull>`
* :doc:`Null <constraints/Null>`
* :doc:`True <constraints/True>`
* :doc:`False <constraints/False>`
* :doc:`Type <constraints/Type>`

String Constraints
~~~~~~~~~~~~~~~~~~

* :doc:`Email <constraints/Email>`
* :doc:`MinLength <constraints/MinLength>`
* :doc:`MaxLength <constraints/MaxLength>`
* :doc:`Url <constraints/Url>`
* :doc:`Regex <constraints/Regex>`
* :doc:`Ip <constraints/Ip>`

Number Constraints
~~~~~~~~~~~~~~~~~~

* :doc:`Max <constraints/Max>`
* :doc:`Min <constraints/Min>`

Date Constraints
~~~~~~~~~~~~~~~~

* :doc:`Date <constraints/Date>`
* :doc:`DateTime <constraints/DateTime>`
* :doc:`Time <constraints/Time>`

Collection Constraints
~~~~~~~~~~~~~~~~~~~~~~

* :doc:`Choice <constraints/Choice>`
* :doc:`Collection <constraints/Collection>`
* :doc:`UniqueEntity <constraints/UniqueEntity>`
* :doc:`Language <constraints/Language>`
* :doc:`Locale <constraints/Locale>`
* :doc:`Country <constraints/Country>`

File Constraints
~~~~~~~~~~~~~~~~

* :doc:`File <constraints/File>`
* :doc:`Image <constraints/Image>`

Other Constraints
~~~~~~~~~~~~~~~~~

* :doc:`Callback <constraints/Callback>`
* :doc:`All <constraints/All>`
* :doc:`Valid <constraints/Valid>`
.. include:: /reference/forms/types/map.rst.inc
59 changes: 59 additions & 0 deletions reference/constraints/map.rst.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Basic Constraints
~~~~~~~~~~~~~~~~~

These are the basic constraints: use them to assert very basic things about
the value of properties or the return value of methods on your object.

* :doc:`NotBlank </reference/constraints/NotBlank>`
* :doc:`Blank </reference/constraints/Blank>`
* :doc:`NotNull </reference/constraints/NotNull>`
* :doc:`Null </reference/constraints/Null>`
* :doc:`True </reference/constraints/True>`
* :doc:`False </reference/constraints/False>`
* :doc:`Type </reference/constraints/Type>`

String Constraints
~~~~~~~~~~~~~~~~~~

* :doc:`Email </reference/constraints/Email>`
* :doc:`MinLength </reference/constraints/MinLength>`
* :doc:`MaxLength </reference/constraints/MaxLength>`
* :doc:`Url </reference/constraints/Url>`
* :doc:`Regex </reference/constraints/Regex>`
* :doc:`Ip </reference/constraints/Ip>`

Number Constraints
~~~~~~~~~~~~~~~~~~

* :doc:`Max </reference/constraints/Max>`
* :doc:`Min </reference/constraints/Min>`

Date Constraints
~~~~~~~~~~~~~~~~

* :doc:`Date </reference/constraints/Date>`
* :doc:`DateTime </reference/constraints/DateTime>`
* :doc:`Time </reference/constraints/Time>`

Collection Constraints
~~~~~~~~~~~~~~~~~~~~~~

* :doc:`Choice </reference/constraints/Choice>`
* :doc:`Collection </reference/constraints/Collection>`
* :doc:`UniqueEntity </reference/constraints/UniqueEntity>`
* :doc:`Language </reference/constraints/Language>`
* :doc:`Locale </reference/constraints/Locale>`
* :doc:`Country </reference/constraints/Country>`

File Constraints
~~~~~~~~~~~~~~~~

* :doc:`File </reference/constraints/File>`
* :doc:`Image </reference/constraints/Image>`

Other Constraints
~~~~~~~~~~~~~~~~~

* :doc:`Callback </reference/constraints/Callback>`
* :doc:`All </reference/constraints/All>`
* :doc:`Valid </reference/constraints/Valid>`

0 comments on commit 70cd54b

Please sign in to comment.