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.
Attribution-Share Alike 3.0
Validation Constraints Reference
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.
The following constraints are natively available in Symfony2:
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.