diff --git a/book/validation.rst b/book/validation.rst index ca2880f5881..4168ae079bb 100644 --- a/book/validation.rst +++ b/book/validation.rst @@ -586,6 +586,9 @@ allows you to add a constraint to any public method whose name starts with "get", "is" or "has". In this guide, these types of methods are referred to as "getters". +.. versionadded:: 2.5 + Support for methods starting with ``has`` is new in Symfony 2.5. + The benefit of this technique is that it allows you to validate your object dynamically. For example, suppose you want to make sure that a password field doesn't match the first name of the user (for security reasons). You can