From bfe3a203e33a53f5b581bcafa9be67a261067a97 Mon Sep 17 00:00:00 2001 From: Philipp Rieber Date: Sat, 4 Jan 2014 11:47:25 +0100 Subject: [PATCH] [Validation] Add "hasser" support --- book/validation.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/book/validation.rst b/book/validation.rst index ea5315afaae..ca2880f5881 100644 --- a/book/validation.rst +++ b/book/validation.rst @@ -583,8 +583,8 @@ Getters Constraints can also be applied to the return value of a method. Symfony2 allows you to add a constraint to any public method whose name starts with -"get" or "is". In this guide, both of these types of methods are referred -to as "getters". +"get", "is" or "has". In this guide, these types of methods are referred to +as "getters". 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 @@ -665,9 +665,9 @@ Now, create the ``isPasswordLegal()`` method, and include the logic you need:: .. note:: The keen-eyed among you will have noticed that the prefix of the getter - ("get" or "is") is omitted in the mapping. This allows you to move the - constraint to a property with the same name later (or vice versa) without - changing your validation logic. + ("get", "is" or "has") is omitted in the mapping. This allows you to move + the constraint to a property with the same name later (or vice versa) + without changing your validation logic. .. _validation-class-target: