File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ using an email address that already exists in the system.
12
12
| | - `message `_ |
13
13
| | - `em `_ |
14
14
| | - `repositoryMethod `_ |
15
+ | | - `ignoreNull `_ |
15
16
+----------------+-------------------------------------------------------------------------------------+
16
17
| Class | :class: `Symfony\\ Bridge\\ Doctrine\\ Validator\\ Constraints\\ UniqueEntity ` |
17
18
+----------------+-------------------------------------------------------------------------------------+
@@ -149,3 +150,15 @@ repositoryMethod
149
150
The name of the repository method to use for making the query to determine the
150
151
uniqueness. If it's left blank, the ``findBy `` method will be used. This
151
152
method should return a countable result.
153
+
154
+ .. versionadded :: 2.1
155
+ The ``ignoreNull `` option was added in Symfony 2.1.
156
+
157
+ ignoreNull
158
+ ~~~~~~~~~~
159
+
160
+ **type **: ``Boolean `` **default **: ``true ``
161
+
162
+ If this option is set to ``true ``, it allows having multiple ``null `` values for
163
+ the field(s) without failing the unique constraint. If set to ``false ``, only one
164
+ ``null `` value is allowed.
You can’t perform that action at this time.
0 commit comments