File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,14 @@ fields
84
84
**type **: ``array``|``string `` [:ref: `default option<validation-default-option> `]
85
85
86
86
This required option is the field (or list of fields) on which this entity
87
- should be unique. For example, you could specify that both the email and
88
- name fields in the ``User `` example above should be unique.
87
+ should be unique. For example, if you specified both the ``email `` and ``name ``
88
+ field in a single ``UniqueEntity `` constraint, then it would enforce that
89
+ the combination value where unique (e.g. two users could have the same email,
90
+ as long as they don't have the same name also).
91
+
92
+ If you need to require two fields to be individually unique (e.g. a unique
93
+ ``email `` *and * a unique ``username ``), you use two ``UniqueEntity `` entries,
94
+ each with a single field.
89
95
90
96
message
91
97
~~~~~~~
You can’t perform that action at this time.
0 commit comments