We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4f62f6 commit 8233bc8Copy full SHA for 8233bc8
lib/helpers/flatten.js
@@ -1,3 +1,4 @@
1
+"use strict";
2
3
/**
4
* Flatten an array
lib/validator.js
@@ -26,10 +26,13 @@ function loadRules() {
26
*
27
* @param {Object} opts
28
*/
29
-function Validator(opts = {}) {
30
- this.opts = deepExtend({
+function Validator(opts) {
+ this.opts = {
31
messages: defaultMessages
32
- }, opts);
+ };
33
+
34
+ if (opts)
35
+ deepExtend(this.opts, opts);
36
37
this.messages = this.opts.messages;
38
0 commit comments