Skip to content

Commit 0efdda7

Browse files
committed
[book] [validation] Constraints can be applied to an entire class too
1 parent 9860554 commit 0efdda7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

book/validation.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,11 @@ For information on translating the constraint messages, see
511511
Constraint Targets
512512
------------------
513513

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

518520
.. index::
519521
single: Validation; Property constraints

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy