.. toctree:: :maxdepth: 1 :hidden: constraints/False constraints/True constraints/Type constraints/Callback constraints/Choice constraints/Collection constraints/Date constraints/DateTime constraints/Email constraints/File constraints/Max constraints/MaxLength constraints/Min constraints/MinLength constraints/NotBlank constraints/NotNull constraints/Regex constraints/Time constraints/Url constraints/Valid
The Validator is designed to validate objects against constraints. In real life, a constraint could be: "The cake must not be burned". In Symfony2, constraints are similar: They are assertions that a condition is true.
The following constraints are natively available in Symfony2:
- :doc:`False <constraints/False>`
- :doc:`True <constraints/True>`
- :doc:`Type <constraints/Type>`
- :doc:`Callback <constraints/Callback>`
- :doc:`Choice <constraints/Choice>`
- :doc:`Collection <constraints/Collection>`
- :doc:`Date <constraints/Date>`
- :doc:`DateTime <constraints/DateTime>`
- :doc:`Email <constraints/Email>`
- :doc:`File <constraints/File>`
- :doc:`Max <constraints/Max>`
- :doc:`MaxLength <constraints/MaxLength>`
- :doc:`Min <constraints/Min>`
- :doc:`MinLength <constraints/MinLength>`
- :doc:`NotBlank <constraints/NotBlank>`
- :doc:`NotNull <constraints/NotNull>`
- :doc:`Regex <constraints/Regex>`
- :doc:`Time <constraints/Time>`
- :doc:`Url <constraints/Url>`
- :doc:`Valid <constraints/Valid>`