Table of Contents
Questions & Feedback
Found a typo or an error?
Want to improve this document? Edit it.
Need support or have a technical question?
Post to the user mailing-list.
Master Symfony2 fundamentals
Be trained by SensioLabs experts (2 to 6 day sessions -- French or English).
trainings.sensiolabs.com
Symfony hosting done right
ServerGrove, outstanding support at the right price for your Symfony hosting needs.
servergrove.com
Discover the SensioLabs Support
Access to the SensioLabs Competency Center for an exclusive and tailor-made support on Symfony
sensiolabs.com
2.0 version
Validation Constraints Reference
Caution: You are browsing the documentation for Symfony version 2.0 which is not maintained anymore.
If some of your projects are still using this version, consider upgrading.
Validation Constraints Reference¶
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.





is a trademark of Fabien Potencier. All rights reserved.