Skip to content

Commit

Permalink
minor #6380 [book] [validation] Constraints can be applied to an enti…
Browse files Browse the repository at this point in the history
…re class too (sustmi)

This PR was merged into the 2.3 branch.

Discussion
----------

[book] [validation] Constraints can be applied to an entire class too

Commits
-------

0efdda7 [book] [validation] Constraints can be applied to an entire class too
  • Loading branch information
wouterj committed May 27, 2016
2 parents 90a2922 + 0efdda7 commit ac58673
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions book/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,11 @@ For information on translating the constraint messages, see
Constraint Targets
------------------

Constraints can be applied to a class property (e.g. ``name``) or a public
getter method (e.g. ``getFullName``). The first is the most common and easy
to use, but the second allows you to specify more complex validation rules.
Constraints can be applied to a class property (e.g. ``name``), a public
getter method (e.g. ``getFullName``) or an entire class. Property constraints
are the most common and easy to use. Getter constraints allow you to specify
more complex validation rules. Finally, class constraints are intended
for scenarios where you want to validate a class as a whole.

.. index::
single: Validation; Property constraints
Expand Down

0 comments on commit ac58673

Please sign in to comment.