Commit df8de53
committed
fix: allow disabling uniqueValidator by passing false
Previously, passing `uniqueValidator: false` would still invoke the
mongoose-unique-validator plugin with `false` as options, which doesn't
disable it.
Now, when `options.uniqueValidator === false`, the plugin is not applied
at all, allowing consumers to opt out of the unique validation for
performance reasons on large collections.1 parent ff6efa5 commit df8de53
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| |||
0 commit comments