Skip to content

Commit

Permalink
[Validation] Add "hasser" support
Browse files Browse the repository at this point in the history
  • Loading branch information
bicpi committed Jan 4, 2014
1 parent b1e0886 commit bfe3a20
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions book/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:

Expand Down

0 comments on commit bfe3a20

Please sign in to comment.