z-schema 3.20.0 → 3.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3178,10 +3178,18 @@ var _isISO = require('./lib/isISO8601');
3178
3178
 
3179
3179
  var _isISO2 = _interopRequireDefault(_isISO);
3180
3180
 
3181
+ var _isRFC = require('./lib/isRFC3339');
3182
+
3183
+ var _isRFC2 = _interopRequireDefault(_isRFC);
3184
+
3181
3185
  var _isISO31661Alpha = require('./lib/isISO31661Alpha2');
3182
3186
 
3183
3187
  var _isISO31661Alpha2 = _interopRequireDefault(_isISO31661Alpha);
3184
3188
 
3189
+ var _isISO31661Alpha3 = require('./lib/isISO31661Alpha3');
3190
+
3191
+ var _isISO31661Alpha4 = _interopRequireDefault(_isISO31661Alpha3);
3192
+
3185
3193
  var _isBase = require('./lib/isBase64');
3186
3194
 
3187
3195
  var _isBase2 = _interopRequireDefault(_isBase);
@@ -3248,7 +3256,7 @@ var _toString2 = _interopRequireDefault(_toString);
3248
3256
 
3249
3257
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3250
3258
 
3251
- var version = '9.4.1';
3259
+ var version = '10.2.0';
3252
3260
 
3253
3261
  var validator = {
3254
3262
  version: version,
@@ -3301,9 +3309,12 @@ var validator = {
3301
3309
  isISSN: _isISSN2.default,
3302
3310
  isMobilePhone: _isMobilePhone2.default,
3303
3311
  isPostalCode: _isPostalCode2.default,
3312
+ isPostalCodeLocales: _isPostalCode.locales,
3304
3313
  isCurrency: _isCurrency2.default,
3305
3314
  isISO8601: _isISO2.default,
3315
+ isRFC3339: _isRFC2.default,
3306
3316
  isISO31661Alpha2: _isISO31661Alpha2.default,
3317
+ isISO31661Alpha3: _isISO31661Alpha4.default,
3307
3318
  isBase64: _isBase2.default,
3308
3319
  isDataURI: _isDataURI2.default,
3309
3320
  isMimeType: _isMimeType2.default,
@@ -3323,7 +3334,7 @@ var validator = {
3323
3334
 
3324
3335
  exports.default = validator;
3325
3336
  module.exports = exports['default'];
3326
- },{"./lib/blacklist":6,"./lib/contains":7,"./lib/equals":8,"./lib/escape":9,"./lib/isAfter":10,"./lib/isAlpha":11,"./lib/isAlphanumeric":12,"./lib/isAscii":13,"./lib/isBase64":14,"./lib/isBefore":15,"./lib/isBoolean":16,"./lib/isByteLength":17,"./lib/isCreditCard":18,"./lib/isCurrency":19,"./lib/isDataURI":20,"./lib/isDecimal":21,"./lib/isDivisibleBy":22,"./lib/isEmail":23,"./lib/isEmpty":24,"./lib/isFQDN":25,"./lib/isFloat":26,"./lib/isFullWidth":27,"./lib/isHalfWidth":28,"./lib/isHash":29,"./lib/isHexColor":30,"./lib/isHexadecimal":31,"./lib/isIP":32,"./lib/isISBN":33,"./lib/isISIN":34,"./lib/isISO31661Alpha2":35,"./lib/isISO8601":36,"./lib/isISRC":37,"./lib/isISSN":38,"./lib/isIn":39,"./lib/isInt":40,"./lib/isJSON":41,"./lib/isLatLong":42,"./lib/isLength":43,"./lib/isLowercase":44,"./lib/isMACAddress":45,"./lib/isMD5":46,"./lib/isMimeType":47,"./lib/isMobilePhone":48,"./lib/isMongoId":49,"./lib/isMultibyte":50,"./lib/isNumeric":51,"./lib/isPort":52,"./lib/isPostalCode":53,"./lib/isSurrogatePair":54,"./lib/isURL":55,"./lib/isUUID":56,"./lib/isUppercase":57,"./lib/isVariableWidth":58,"./lib/isWhitelisted":59,"./lib/ltrim":60,"./lib/matches":61,"./lib/normalizeEmail":62,"./lib/rtrim":63,"./lib/stripLow":64,"./lib/toBoolean":65,"./lib/toDate":66,"./lib/toFloat":67,"./lib/toInt":68,"./lib/trim":69,"./lib/unescape":70,"./lib/util/toString":73,"./lib/whitelist":74}],5:[function(require,module,exports){
3337
+ },{"./lib/blacklist":6,"./lib/contains":7,"./lib/equals":8,"./lib/escape":9,"./lib/isAfter":10,"./lib/isAlpha":11,"./lib/isAlphanumeric":12,"./lib/isAscii":13,"./lib/isBase64":14,"./lib/isBefore":15,"./lib/isBoolean":16,"./lib/isByteLength":17,"./lib/isCreditCard":18,"./lib/isCurrency":19,"./lib/isDataURI":20,"./lib/isDecimal":21,"./lib/isDivisibleBy":22,"./lib/isEmail":23,"./lib/isEmpty":24,"./lib/isFQDN":25,"./lib/isFloat":26,"./lib/isFullWidth":27,"./lib/isHalfWidth":28,"./lib/isHash":29,"./lib/isHexColor":30,"./lib/isHexadecimal":31,"./lib/isIP":32,"./lib/isISBN":33,"./lib/isISIN":34,"./lib/isISO31661Alpha2":35,"./lib/isISO31661Alpha3":36,"./lib/isISO8601":37,"./lib/isISRC":38,"./lib/isISSN":39,"./lib/isIn":40,"./lib/isInt":41,"./lib/isJSON":42,"./lib/isLatLong":43,"./lib/isLength":44,"./lib/isLowercase":45,"./lib/isMACAddress":46,"./lib/isMD5":47,"./lib/isMimeType":48,"./lib/isMobilePhone":49,"./lib/isMongoId":50,"./lib/isMultibyte":51,"./lib/isNumeric":52,"./lib/isPort":53,"./lib/isPostalCode":54,"./lib/isRFC3339":55,"./lib/isSurrogatePair":56,"./lib/isURL":57,"./lib/isUUID":58,"./lib/isUppercase":59,"./lib/isVariableWidth":60,"./lib/isWhitelisted":61,"./lib/ltrim":62,"./lib/matches":63,"./lib/normalizeEmail":64,"./lib/rtrim":65,"./lib/stripLow":66,"./lib/toBoolean":67,"./lib/toDate":68,"./lib/toFloat":69,"./lib/toInt":70,"./lib/trim":71,"./lib/unescape":72,"./lib/util/toString":75,"./lib/whitelist":76}],5:[function(require,module,exports){
3327
3338
  'use strict';
3328
3339
 
3329
3340
  Object.defineProperty(exports, "__esModule", {
@@ -3439,7 +3450,7 @@ function blacklist(str, chars) {
3439
3450
  return str.replace(new RegExp('[' + chars + ']+', 'g'), '');
3440
3451
  }
3441
3452
  module.exports = exports['default'];
3442
- },{"./util/assertString":71}],7:[function(require,module,exports){
3453
+ },{"./util/assertString":73}],7:[function(require,module,exports){
3443
3454
  'use strict';
3444
3455
 
3445
3456
  Object.defineProperty(exports, "__esModule", {
@@ -3462,7 +3473,7 @@ function contains(str, elem) {
3462
3473
  return str.indexOf((0, _toString2.default)(elem)) >= 0;
3463
3474
  }
3464
3475
  module.exports = exports['default'];
3465
- },{"./util/assertString":71,"./util/toString":73}],8:[function(require,module,exports){
3476
+ },{"./util/assertString":73,"./util/toString":75}],8:[function(require,module,exports){
3466
3477
  'use strict';
3467
3478
 
3468
3479
  Object.defineProperty(exports, "__esModule", {
@@ -3481,7 +3492,7 @@ function equals(str, comparison) {
3481
3492
  return str === comparison;
3482
3493
  }
3483
3494
  module.exports = exports['default'];
3484
- },{"./util/assertString":71}],9:[function(require,module,exports){
3495
+ },{"./util/assertString":73}],9:[function(require,module,exports){
3485
3496
  'use strict';
3486
3497
 
3487
3498
  Object.defineProperty(exports, "__esModule", {
@@ -3500,7 +3511,7 @@ function escape(str) {
3500
3511
  return str.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\//g, '&#x2F;').replace(/\\/g, '&#x5C;').replace(/`/g, '&#96;');
3501
3512
  }
3502
3513
  module.exports = exports['default'];
3503
- },{"./util/assertString":71}],10:[function(require,module,exports){
3514
+ },{"./util/assertString":73}],10:[function(require,module,exports){
3504
3515
  'use strict';
3505
3516
 
3506
3517
  Object.defineProperty(exports, "__esModule", {
@@ -3527,7 +3538,7 @@ function isAfter(str) {
3527
3538
  return !!(original && comparison && original > comparison);
3528
3539
  }
3529
3540
  module.exports = exports['default'];
3530
- },{"./toDate":66,"./util/assertString":71}],11:[function(require,module,exports){
3541
+ },{"./toDate":68,"./util/assertString":73}],11:[function(require,module,exports){
3531
3542
  'use strict';
3532
3543
 
3533
3544
  Object.defineProperty(exports, "__esModule", {
@@ -3553,7 +3564,7 @@ function isAlpha(str) {
3553
3564
  throw new Error('Invalid locale \'' + locale + '\'');
3554
3565
  }
3555
3566
  module.exports = exports['default'];
3556
- },{"./alpha":5,"./util/assertString":71}],12:[function(require,module,exports){
3567
+ },{"./alpha":5,"./util/assertString":73}],12:[function(require,module,exports){
3557
3568
  'use strict';
3558
3569
 
3559
3570
  Object.defineProperty(exports, "__esModule", {
@@ -3579,7 +3590,7 @@ function isAlphanumeric(str) {
3579
3590
  throw new Error('Invalid locale \'' + locale + '\'');
3580
3591
  }
3581
3592
  module.exports = exports['default'];
3582
- },{"./alpha":5,"./util/assertString":71}],13:[function(require,module,exports){
3593
+ },{"./alpha":5,"./util/assertString":73}],13:[function(require,module,exports){
3583
3594
  'use strict';
3584
3595
 
3585
3596
  Object.defineProperty(exports, "__esModule", {
@@ -3602,7 +3613,7 @@ function isAscii(str) {
3602
3613
  return ascii.test(str);
3603
3614
  }
3604
3615
  module.exports = exports['default'];
3605
- },{"./util/assertString":71}],14:[function(require,module,exports){
3616
+ },{"./util/assertString":73}],14:[function(require,module,exports){
3606
3617
  'use strict';
3607
3618
 
3608
3619
  Object.defineProperty(exports, "__esModule", {
@@ -3628,7 +3639,7 @@ function isBase64(str) {
3628
3639
  return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '=';
3629
3640
  }
3630
3641
  module.exports = exports['default'];
3631
- },{"./util/assertString":71}],15:[function(require,module,exports){
3642
+ },{"./util/assertString":73}],15:[function(require,module,exports){
3632
3643
  'use strict';
3633
3644
 
3634
3645
  Object.defineProperty(exports, "__esModule", {
@@ -3655,7 +3666,7 @@ function isBefore(str) {
3655
3666
  return !!(original && comparison && original < comparison);
3656
3667
  }
3657
3668
  module.exports = exports['default'];
3658
- },{"./toDate":66,"./util/assertString":71}],16:[function(require,module,exports){
3669
+ },{"./toDate":68,"./util/assertString":73}],16:[function(require,module,exports){
3659
3670
  'use strict';
3660
3671
 
3661
3672
  Object.defineProperty(exports, "__esModule", {
@@ -3674,7 +3685,7 @@ function isBoolean(str) {
3674
3685
  return ['true', 'false', '1', '0'].indexOf(str) >= 0;
3675
3686
  }
3676
3687
  module.exports = exports['default'];
3677
- },{"./util/assertString":71}],17:[function(require,module,exports){
3688
+ },{"./util/assertString":73}],17:[function(require,module,exports){
3678
3689
  'use strict';
3679
3690
 
3680
3691
  Object.defineProperty(exports, "__esModule", {
@@ -3708,7 +3719,7 @@ function isByteLength(str, options) {
3708
3719
  return len >= min && (typeof max === 'undefined' || len <= max);
3709
3720
  }
3710
3721
  module.exports = exports['default'];
3711
- },{"./util/assertString":71}],18:[function(require,module,exports){
3722
+ },{"./util/assertString":73}],18:[function(require,module,exports){
3712
3723
  'use strict';
3713
3724
 
3714
3725
  Object.defineProperty(exports, "__esModule", {
@@ -3723,7 +3734,7 @@ var _assertString2 = _interopRequireDefault(_assertString);
3723
3734
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3724
3735
 
3725
3736
  /* eslint-disable max-len */
3726
- var creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|62[0-9]{14})$/;
3737
+ var creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14})$/;
3727
3738
  /* eslint-enable max-len */
3728
3739
 
3729
3740
  function isCreditCard(str) {
@@ -3754,7 +3765,7 @@ function isCreditCard(str) {
3754
3765
  return !!(sum % 10 === 0 ? sanitized : false);
3755
3766
  }
3756
3767
  module.exports = exports['default'];
3757
- },{"./util/assertString":71}],19:[function(require,module,exports){
3768
+ },{"./util/assertString":73}],19:[function(require,module,exports){
3758
3769
  'use strict';
3759
3770
 
3760
3771
  Object.defineProperty(exports, "__esModule", {
@@ -3847,7 +3858,7 @@ function isCurrency(str, options) {
3847
3858
  return currencyRegex(options).test(str);
3848
3859
  }
3849
3860
  module.exports = exports['default'];
3850
- },{"./util/assertString":71,"./util/merge":72}],20:[function(require,module,exports){
3861
+ },{"./util/assertString":73,"./util/merge":74}],20:[function(require,module,exports){
3851
3862
  'use strict';
3852
3863
 
3853
3864
  Object.defineProperty(exports, "__esModule", {
@@ -3897,7 +3908,7 @@ function isDataURI(str) {
3897
3908
  return true;
3898
3909
  }
3899
3910
  module.exports = exports['default'];
3900
- },{"./util/assertString":71}],21:[function(require,module,exports){
3911
+ },{"./util/assertString":73}],21:[function(require,module,exports){
3901
3912
  'use strict';
3902
3913
 
3903
3914
  Object.defineProperty(exports, "__esModule", {
@@ -3939,7 +3950,7 @@ function isDecimal(str, options) {
3939
3950
  throw new Error('Invalid locale \'' + options.locale + '\'');
3940
3951
  }
3941
3952
  module.exports = exports['default'];
3942
- },{"./alpha":5,"./util/assertString":71,"./util/merge":72}],22:[function(require,module,exports){
3953
+ },{"./alpha":5,"./util/assertString":73,"./util/merge":74}],22:[function(require,module,exports){
3943
3954
  'use strict';
3944
3955
 
3945
3956
  Object.defineProperty(exports, "__esModule", {
@@ -3962,7 +3973,7 @@ function isDivisibleBy(str, num) {
3962
3973
  return (0, _toFloat2.default)(str) % parseInt(num, 10) === 0;
3963
3974
  }
3964
3975
  module.exports = exports['default'];
3965
- },{"./toFloat":67,"./util/assertString":71}],23:[function(require,module,exports){
3976
+ },{"./toFloat":69,"./util/assertString":73}],23:[function(require,module,exports){
3966
3977
  'use strict';
3967
3978
 
3968
3979
  Object.defineProperty(exports, "__esModule", {
@@ -4023,8 +4034,16 @@ function isEmail(str, options) {
4023
4034
  var user = parts.join('@');
4024
4035
 
4025
4036
  var lower_domain = domain.toLowerCase();
4037
+
4026
4038
  if (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com') {
4027
- user = user.replace(/\./g, '').toLowerCase();
4039
+ /*
4040
+ Previously we removed dots for gmail addresses before validating.
4041
+ This was removed because it allows `multiple..dots@gmail.com`
4042
+ to be reported as valid, but it is not.
4043
+ Gmail only normalizes single dots, removing them from here is pointless,
4044
+ should be done in normalizeEmail
4045
+ */
4046
+ user = user.toLowerCase();
4028
4047
  }
4029
4048
 
4030
4049
  if (!(0, _isByteLength2.default)(user, { max: 64 }) || !(0, _isByteLength2.default)(domain, { max: 254 })) {
@@ -4052,7 +4071,7 @@ function isEmail(str, options) {
4052
4071
  return true;
4053
4072
  }
4054
4073
  module.exports = exports['default'];
4055
- },{"./isByteLength":17,"./isFQDN":25,"./util/assertString":71,"./util/merge":72}],24:[function(require,module,exports){
4074
+ },{"./isByteLength":17,"./isFQDN":25,"./util/assertString":73,"./util/merge":74}],24:[function(require,module,exports){
4056
4075
  'use strict';
4057
4076
 
4058
4077
  Object.defineProperty(exports, "__esModule", {
@@ -4071,7 +4090,7 @@ function isEmpty(str) {
4071
4090
  return str.length === 0;
4072
4091
  }
4073
4092
  module.exports = exports['default'];
4074
- },{"./util/assertString":71}],25:[function(require,module,exports){
4093
+ },{"./util/assertString":73}],25:[function(require,module,exports){
4075
4094
  'use strict';
4076
4095
 
4077
4096
  Object.defineProperty(exports, "__esModule", {
@@ -4104,6 +4123,11 @@ function isFQDN(str, options) {
4104
4123
  str = str.substring(0, str.length - 1);
4105
4124
  }
4106
4125
  var parts = str.split('.');
4126
+ for (var i = 0; i < parts.length; i++) {
4127
+ if (parts[i].length > 63) {
4128
+ return false;
4129
+ }
4130
+ }
4107
4131
  if (options.require_tld) {
4108
4132
  var tld = parts.pop();
4109
4133
  if (!parts.length || !/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
@@ -4114,8 +4138,8 @@ function isFQDN(str, options) {
4114
4138
  return false;
4115
4139
  }
4116
4140
  }
4117
- for (var part, i = 0; i < parts.length; i++) {
4118
- part = parts[i];
4141
+ for (var part, _i = 0; _i < parts.length; _i++) {
4142
+ part = parts[_i];
4119
4143
  if (options.allow_underscores) {
4120
4144
  part = part.replace(/_/g, '');
4121
4145
  }
@@ -4133,7 +4157,7 @@ function isFQDN(str, options) {
4133
4157
  return true;
4134
4158
  }
4135
4159
  module.exports = exports['default'];
4136
- },{"./util/assertString":71,"./util/merge":72}],26:[function(require,module,exports){
4160
+ },{"./util/assertString":73,"./util/merge":74}],26:[function(require,module,exports){
4137
4161
  'use strict';
4138
4162
 
4139
4163
  Object.defineProperty(exports, "__esModule", {
@@ -4156,10 +4180,11 @@ function isFloat(str, options) {
4156
4180
  if (str === '' || str === '.' || str === '-' || str === '+') {
4157
4181
  return false;
4158
4182
  }
4159
- return float.test(str) && (!options.hasOwnProperty('min') || str >= options.min) && (!options.hasOwnProperty('max') || str <= options.max) && (!options.hasOwnProperty('lt') || str < options.lt) && (!options.hasOwnProperty('gt') || str > options.gt);
4183
+ var value = parseFloat(str.replace(',', '.'));
4184
+ return float.test(str) && (!options.hasOwnProperty('min') || value >= options.min) && (!options.hasOwnProperty('max') || value <= options.max) && (!options.hasOwnProperty('lt') || value < options.lt) && (!options.hasOwnProperty('gt') || value > options.gt);
4160
4185
  }
4161
4186
  module.exports = exports['default'];
4162
- },{"./alpha":5,"./util/assertString":71}],27:[function(require,module,exports){
4187
+ },{"./alpha":5,"./util/assertString":73}],27:[function(require,module,exports){
4163
4188
  'use strict';
4164
4189
 
4165
4190
  Object.defineProperty(exports, "__esModule", {
@@ -4180,7 +4205,7 @@ function isFullWidth(str) {
4180
4205
  (0, _assertString2.default)(str);
4181
4206
  return fullWidth.test(str);
4182
4207
  }
4183
- },{"./util/assertString":71}],28:[function(require,module,exports){
4208
+ },{"./util/assertString":73}],28:[function(require,module,exports){
4184
4209
  'use strict';
4185
4210
 
4186
4211
  Object.defineProperty(exports, "__esModule", {
@@ -4201,7 +4226,7 @@ function isHalfWidth(str) {
4201
4226
  (0, _assertString2.default)(str);
4202
4227
  return halfWidth.test(str);
4203
4228
  }
4204
- },{"./util/assertString":71}],29:[function(require,module,exports){
4229
+ },{"./util/assertString":73}],29:[function(require,module,exports){
4205
4230
  'use strict';
4206
4231
 
4207
4232
  Object.defineProperty(exports, "__esModule", {
@@ -4237,7 +4262,7 @@ function isHash(str, algorithm) {
4237
4262
  return hash.test(str);
4238
4263
  }
4239
4264
  module.exports = exports['default'];
4240
- },{"./util/assertString":71}],30:[function(require,module,exports){
4265
+ },{"./util/assertString":73}],30:[function(require,module,exports){
4241
4266
  'use strict';
4242
4267
 
4243
4268
  Object.defineProperty(exports, "__esModule", {
@@ -4258,7 +4283,7 @@ function isHexColor(str) {
4258
4283
  return hexcolor.test(str);
4259
4284
  }
4260
4285
  module.exports = exports['default'];
4261
- },{"./util/assertString":71}],31:[function(require,module,exports){
4286
+ },{"./util/assertString":73}],31:[function(require,module,exports){
4262
4287
  'use strict';
4263
4288
 
4264
4289
  Object.defineProperty(exports, "__esModule", {
@@ -4279,7 +4304,7 @@ function isHexadecimal(str) {
4279
4304
  return hexadecimal.test(str);
4280
4305
  }
4281
4306
  module.exports = exports['default'];
4282
- },{"./util/assertString":71}],32:[function(require,module,exports){
4307
+ },{"./util/assertString":73}],32:[function(require,module,exports){
4283
4308
  'use strict';
4284
4309
 
4285
4310
  Object.defineProperty(exports, "__esModule", {
@@ -4361,7 +4386,7 @@ function isIP(str) {
4361
4386
  return false;
4362
4387
  }
4363
4388
  module.exports = exports['default'];
4364
- },{"./util/assertString":71}],33:[function(require,module,exports){
4389
+ },{"./util/assertString":73}],33:[function(require,module,exports){
4365
4390
  'use strict';
4366
4391
 
4367
4392
  Object.defineProperty(exports, "__esModule", {
@@ -4419,7 +4444,7 @@ function isISBN(str) {
4419
4444
  return false;
4420
4445
  }
4421
4446
  module.exports = exports['default'];
4422
- },{"./util/assertString":71}],34:[function(require,module,exports){
4447
+ },{"./util/assertString":73}],34:[function(require,module,exports){
4423
4448
  'use strict';
4424
4449
 
4425
4450
  Object.defineProperty(exports, "__esModule", {
@@ -4468,7 +4493,7 @@ function isISIN(str) {
4468
4493
  return parseInt(str.substr(str.length - 1), 10) === (10000 - sum) % 10;
4469
4494
  }
4470
4495
  module.exports = exports['default'];
4471
- },{"./util/assertString":71}],35:[function(require,module,exports){
4496
+ },{"./util/assertString":73}],35:[function(require,module,exports){
4472
4497
  'use strict';
4473
4498
 
4474
4499
  Object.defineProperty(exports, "__esModule", {
@@ -4490,7 +4515,29 @@ function isISO31661Alpha2(str) {
4490
4515
  return validISO31661Alpha2CountriesCodes.includes(str.toUpperCase());
4491
4516
  }
4492
4517
  module.exports = exports['default'];
4493
- },{"./util/assertString":71}],36:[function(require,module,exports){
4518
+ },{"./util/assertString":73}],36:[function(require,module,exports){
4519
+ 'use strict';
4520
+
4521
+ Object.defineProperty(exports, "__esModule", {
4522
+ value: true
4523
+ });
4524
+ exports.default = isISO31661Alpha3;
4525
+
4526
+ var _assertString = require('./util/assertString');
4527
+
4528
+ var _assertString2 = _interopRequireDefault(_assertString);
4529
+
4530
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4531
+
4532
+ // from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
4533
+ var validISO31661Alpha3CountriesCodes = ['AFG', 'ALA', 'ALB', 'DZA', 'ASM', 'AND', 'AGO', 'AIA', 'ATA', 'ATG', 'ARG', 'ARM', 'ABW', 'AUS', 'AUT', 'AZE', 'BHS', 'BHR', 'BGD', 'BRB', 'BLR', 'BEL', 'BLZ', 'BEN', 'BMU', 'BTN', 'BOL', 'BES', 'BIH', 'BWA', 'BVT', 'BRA', 'IOT', 'BRN', 'BGR', 'BFA', 'BDI', 'KHM', 'CMR', 'CAN', 'CPV', 'CYM', 'CAF', 'TCD', 'CHL', 'CHN', 'CXR', 'CCK', 'COL', 'COM', 'COG', 'COD', 'COK', 'CRI', 'CIV', 'HRV', 'CUB', 'CUW', 'CYP', 'CZE', 'DNK', 'DJI', 'DMA', 'DOM', 'ECU', 'EGY', 'SLV', 'GNQ', 'ERI', 'EST', 'ETH', 'FLK', 'FRO', 'FJI', 'FIN', 'FRA', 'GUF', 'PYF', 'ATF', 'GAB', 'GMB', 'GEO', 'DEU', 'GHA', 'GIB', 'GRC', 'GRL', 'GRD', 'GLP', 'GUM', 'GTM', 'GGY', 'GIN', 'GNB', 'GUY', 'HTI', 'HMD', 'VAT', 'HND', 'HKG', 'HUN', 'ISL', 'IND', 'IDN', 'IRN', 'IRQ', 'IRL', 'IMN', 'ISR', 'ITA', 'JAM', 'JPN', 'JEY', 'JOR', 'KAZ', 'KEN', 'KIR', 'PRK', 'KOR', 'KWT', 'KGZ', 'LAO', 'LVA', 'LBN', 'LSO', 'LBR', 'LBY', 'LIE', 'LTU', 'LUX', 'MAC', 'MKD', 'MDG', 'MWI', 'MYS', 'MDV', 'MLI', 'MLT', 'MHL', 'MTQ', 'MRT', 'MUS', 'MYT', 'MEX', 'FSM', 'MDA', 'MCO', 'MNG', 'MNE', 'MSR', 'MAR', 'MOZ', 'MMR', 'NAM', 'NRU', 'NPL', 'NLD', 'NCL', 'NZL', 'NIC', 'NER', 'NGA', 'NIU', 'NFK', 'MNP', 'NOR', 'OMN', 'PAK', 'PLW', 'PSE', 'PAN', 'PNG', 'PRY', 'PER', 'PHL', 'PCN', 'POL', 'PRT', 'PRI', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'BLM', 'SHN', 'KNA', 'LCA', 'MAF', 'SPM', 'VCT', 'WSM', 'SMR', 'STP', 'SAU', 'SEN', 'SRB', 'SYC', 'SLE', 'SGP', 'SXM', 'SVK', 'SVN', 'SLB', 'SOM', 'ZAF', 'SGS', 'SSD', 'ESP', 'LKA', 'SDN', 'SUR', 'SJM', 'SWZ', 'SWE', 'CHE', 'SYR', 'TWN', 'TJK', 'TZA', 'THA', 'TLS', 'TGO', 'TKL', 'TON', 'TTO', 'TUN', 'TUR', 'TKM', 'TCA', 'TUV', 'UGA', 'UKR', 'ARE', 'GBR', 'USA', 'UMI', 'URY', 'UZB', 'VUT', 'VEN', 'VNM', 'VGB', 'VIR', 'WLF', 'ESH', 'YEM', 'ZMB', 'ZWE'];
4534
+
4535
+ function isISO31661Alpha3(str) {
4536
+ (0, _assertString2.default)(str);
4537
+ return validISO31661Alpha3CountriesCodes.includes(str.toUpperCase());
4538
+ }
4539
+ module.exports = exports['default'];
4540
+ },{"./util/assertString":73}],37:[function(require,module,exports){
4494
4541
  'use strict';
4495
4542
 
4496
4543
  Object.defineProperty(exports, "__esModule", {
@@ -4514,7 +4561,7 @@ function isISO8601(str) {
4514
4561
  return iso8601.test(str);
4515
4562
  }
4516
4563
  module.exports = exports['default'];
4517
- },{"./util/assertString":71}],37:[function(require,module,exports){
4564
+ },{"./util/assertString":73}],38:[function(require,module,exports){
4518
4565
  'use strict';
4519
4566
 
4520
4567
  Object.defineProperty(exports, "__esModule", {
@@ -4536,7 +4583,7 @@ function isISRC(str) {
4536
4583
  return isrc.test(str);
4537
4584
  }
4538
4585
  module.exports = exports['default'];
4539
- },{"./util/assertString":71}],38:[function(require,module,exports){
4586
+ },{"./util/assertString":73}],39:[function(require,module,exports){
4540
4587
  'use strict';
4541
4588
 
4542
4589
  Object.defineProperty(exports, "__esModule", {
@@ -4595,7 +4642,7 @@ function isISSN(str) {
4595
4642
  return checksum % 11 === 0;
4596
4643
  }
4597
4644
  module.exports = exports['default'];
4598
- },{"./util/assertString":71}],39:[function(require,module,exports){
4645
+ },{"./util/assertString":73}],40:[function(require,module,exports){
4599
4646
  'use strict';
4600
4647
 
4601
4648
  Object.defineProperty(exports, "__esModule", {
@@ -4635,7 +4682,7 @@ function isIn(str, options) {
4635
4682
  return false;
4636
4683
  }
4637
4684
  module.exports = exports['default'];
4638
- },{"./util/assertString":71,"./util/toString":73}],40:[function(require,module,exports){
4685
+ },{"./util/assertString":73,"./util/toString":75}],41:[function(require,module,exports){
4639
4686
  'use strict';
4640
4687
 
4641
4688
  Object.defineProperty(exports, "__esModule", {
@@ -4669,7 +4716,7 @@ function isInt(str, options) {
4669
4716
  return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed;
4670
4717
  }
4671
4718
  module.exports = exports['default'];
4672
- },{"./util/assertString":71}],41:[function(require,module,exports){
4719
+ },{"./util/assertString":73}],42:[function(require,module,exports){
4673
4720
  'use strict';
4674
4721
 
4675
4722
  Object.defineProperty(exports, "__esModule", {
@@ -4695,7 +4742,7 @@ function isJSON(str) {
4695
4742
  return false;
4696
4743
  }
4697
4744
  module.exports = exports['default'];
4698
- },{"./util/assertString":71}],42:[function(require,module,exports){
4745
+ },{"./util/assertString":73}],43:[function(require,module,exports){
4699
4746
  'use strict';
4700
4747
 
4701
4748
  Object.defineProperty(exports, "__esModule", {
@@ -4719,7 +4766,7 @@ var lat = /^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/;
4719
4766
  var long = /^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/;
4720
4767
 
4721
4768
  module.exports = exports['default'];
4722
- },{"./util/assertString":71}],43:[function(require,module,exports){
4769
+ },{"./util/assertString":73}],44:[function(require,module,exports){
4723
4770
  'use strict';
4724
4771
 
4725
4772
  Object.defineProperty(exports, "__esModule", {
@@ -4754,7 +4801,7 @@ function isLength(str, options) {
4754
4801
  return len >= min && (typeof max === 'undefined' || len <= max);
4755
4802
  }
4756
4803
  module.exports = exports['default'];
4757
- },{"./util/assertString":71}],44:[function(require,module,exports){
4804
+ },{"./util/assertString":73}],45:[function(require,module,exports){
4758
4805
  'use strict';
4759
4806
 
4760
4807
  Object.defineProperty(exports, "__esModule", {
@@ -4773,7 +4820,7 @@ function isLowercase(str) {
4773
4820
  return str === str.toLowerCase();
4774
4821
  }
4775
4822
  module.exports = exports['default'];
4776
- },{"./util/assertString":71}],45:[function(require,module,exports){
4823
+ },{"./util/assertString":73}],46:[function(require,module,exports){
4777
4824
  'use strict';
4778
4825
 
4779
4826
  Object.defineProperty(exports, "__esModule", {
@@ -4794,7 +4841,7 @@ function isMACAddress(str) {
4794
4841
  return macAddress.test(str);
4795
4842
  }
4796
4843
  module.exports = exports['default'];
4797
- },{"./util/assertString":71}],46:[function(require,module,exports){
4844
+ },{"./util/assertString":73}],47:[function(require,module,exports){
4798
4845
  'use strict';
4799
4846
 
4800
4847
  Object.defineProperty(exports, "__esModule", {
@@ -4815,7 +4862,7 @@ function isMD5(str) {
4815
4862
  return md5.test(str);
4816
4863
  }
4817
4864
  module.exports = exports['default'];
4818
- },{"./util/assertString":71}],47:[function(require,module,exports){
4865
+ },{"./util/assertString":73}],48:[function(require,module,exports){
4819
4866
  'use strict';
4820
4867
 
4821
4868
  Object.defineProperty(exports, "__esModule", {
@@ -4868,7 +4915,7 @@ function isMimeType(str) {
4868
4915
  return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str);
4869
4916
  }
4870
4917
  module.exports = exports['default'];
4871
- },{"./util/assertString":71}],48:[function(require,module,exports){
4918
+ },{"./util/assertString":73}],49:[function(require,module,exports){
4872
4919
  'use strict';
4873
4920
 
4874
4921
  Object.defineProperty(exports, "__esModule", {
@@ -4972,7 +5019,7 @@ function isMobilePhone(str, locale, options) {
4972
5019
  throw new Error('Invalid locale \'' + locale + '\'');
4973
5020
  }
4974
5021
  module.exports = exports['default'];
4975
- },{"./util/assertString":71}],49:[function(require,module,exports){
5022
+ },{"./util/assertString":73}],50:[function(require,module,exports){
4976
5023
  'use strict';
4977
5024
 
4978
5025
  Object.defineProperty(exports, "__esModule", {
@@ -4995,7 +5042,7 @@ function isMongoId(str) {
4995
5042
  return (0, _isHexadecimal2.default)(str) && str.length === 24;
4996
5043
  }
4997
5044
  module.exports = exports['default'];
4998
- },{"./isHexadecimal":31,"./util/assertString":71}],50:[function(require,module,exports){
5045
+ },{"./isHexadecimal":31,"./util/assertString":73}],51:[function(require,module,exports){
4999
5046
  'use strict';
5000
5047
 
5001
5048
  Object.defineProperty(exports, "__esModule", {
@@ -5018,7 +5065,7 @@ function isMultibyte(str) {
5018
5065
  return multibyte.test(str);
5019
5066
  }
5020
5067
  module.exports = exports['default'];
5021
- },{"./util/assertString":71}],51:[function(require,module,exports){
5068
+ },{"./util/assertString":73}],52:[function(require,module,exports){
5022
5069
  'use strict';
5023
5070
 
5024
5071
  Object.defineProperty(exports, "__esModule", {
@@ -5032,14 +5079,14 @@ var _assertString2 = _interopRequireDefault(_assertString);
5032
5079
 
5033
5080
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5034
5081
 
5035
- var numeric = /^[-+]?[0-9]+$/;
5082
+ var numeric = /^[+-]?([0-9]*[.])?[0-9]+$/;
5036
5083
 
5037
5084
  function isNumeric(str) {
5038
5085
  (0, _assertString2.default)(str);
5039
5086
  return numeric.test(str);
5040
5087
  }
5041
5088
  module.exports = exports['default'];
5042
- },{"./util/assertString":71}],52:[function(require,module,exports){
5089
+ },{"./util/assertString":73}],53:[function(require,module,exports){
5043
5090
  'use strict';
5044
5091
 
5045
5092
  Object.defineProperty(exports, "__esModule", {
@@ -5057,7 +5104,7 @@ function isPort(str) {
5057
5104
  return (0, _isInt2.default)(str, { min: 0, max: 65535 });
5058
5105
  }
5059
5106
  module.exports = exports['default'];
5060
- },{"./isInt":40}],53:[function(require,module,exports){
5107
+ },{"./isInt":41}],54:[function(require,module,exports){
5061
5108
  'use strict';
5062
5109
 
5063
5110
  Object.defineProperty(exports, "__esModule", {
@@ -5127,6 +5174,7 @@ var patterns = {
5127
5174
  RU: sixDigit,
5128
5175
  SA: fiveDigit,
5129
5176
  SE: /^\d{3}\s?\d{2}$/,
5177
+ SK: /^\d{3}\s?\d{2}$/,
5130
5178
  TW: /^\d{3}(\d{2})?$/,
5131
5179
  US: /^\d{5}(-\d{4})?$/,
5132
5180
  ZA: fourDigit,
@@ -5134,7 +5182,47 @@ var patterns = {
5134
5182
  };
5135
5183
 
5136
5184
  var locales = exports.locales = Object.keys(patterns);
5137
- },{"./util/assertString":71}],54:[function(require,module,exports){
5185
+ },{"./util/assertString":73}],55:[function(require,module,exports){
5186
+ 'use strict';
5187
+
5188
+ Object.defineProperty(exports, "__esModule", {
5189
+ value: true
5190
+ });
5191
+ exports.default = isRFC3339;
5192
+
5193
+ var _assertString = require('./util/assertString');
5194
+
5195
+ var _assertString2 = _interopRequireDefault(_assertString);
5196
+
5197
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5198
+
5199
+ /* Based on https://tools.ietf.org/html/rfc3339#section-5.6 */
5200
+
5201
+ var dateFullYear = /[0-9]{4}/;
5202
+ var dateMonth = /(0[1-9]|1[0-2])/;
5203
+ var dateMDay = /([12]\d|0[1-9]|3[01])/;
5204
+
5205
+ var timeHour = /([01][0-9]|2[0-3])/;
5206
+ var timeMinute = /[0-5][0-9]/;
5207
+ var timeSecond = /([0-5][0-9]|60)/;
5208
+
5209
+ var timeSecFrac = /(\.[0-9]+)?/;
5210
+ var timeNumOffset = new RegExp('[-+]' + timeHour.source + ':' + timeMinute.source);
5211
+ var timeOffset = new RegExp('([zZ]|' + timeNumOffset.source + ')');
5212
+
5213
+ var partialTime = new RegExp(timeHour.source + ':' + timeMinute.source + ':' + timeSecond.source + timeSecFrac.source);
5214
+
5215
+ var fullDate = new RegExp(dateFullYear.source + '-' + dateMonth.source + '-' + dateMDay.source);
5216
+ var fullTime = new RegExp('' + partialTime.source + timeOffset.source);
5217
+
5218
+ var rfc3339 = new RegExp(fullDate.source + '[ tT]' + fullTime.source);
5219
+
5220
+ function isRFC3339(str) {
5221
+ (0, _assertString2.default)(str);
5222
+ return rfc3339.test(str);
5223
+ }
5224
+ module.exports = exports['default'];
5225
+ },{"./util/assertString":73}],56:[function(require,module,exports){
5138
5226
  'use strict';
5139
5227
 
5140
5228
  Object.defineProperty(exports, "__esModule", {
@@ -5155,7 +5243,7 @@ function isSurrogatePair(str) {
5155
5243
  return surrogatePair.test(str);
5156
5244
  }
5157
5245
  module.exports = exports['default'];
5158
- },{"./util/assertString":71}],55:[function(require,module,exports){
5246
+ },{"./util/assertString":73}],57:[function(require,module,exports){
5159
5247
  'use strict';
5160
5248
 
5161
5249
  Object.defineProperty(exports, "__esModule", {
@@ -5303,7 +5391,7 @@ function isURL(url, options) {
5303
5391
  return true;
5304
5392
  }
5305
5393
  module.exports = exports['default'];
5306
- },{"./isFQDN":25,"./isIP":32,"./util/assertString":71,"./util/merge":72}],56:[function(require,module,exports){
5394
+ },{"./isFQDN":25,"./isIP":32,"./util/assertString":73,"./util/merge":74}],58:[function(require,module,exports){
5307
5395
  'use strict';
5308
5396
 
5309
5397
  Object.defineProperty(exports, "__esModule", {
@@ -5332,7 +5420,7 @@ function isUUID(str) {
5332
5420
  return pattern && pattern.test(str);
5333
5421
  }
5334
5422
  module.exports = exports['default'];
5335
- },{"./util/assertString":71}],57:[function(require,module,exports){
5423
+ },{"./util/assertString":73}],59:[function(require,module,exports){
5336
5424
  'use strict';
5337
5425
 
5338
5426
  Object.defineProperty(exports, "__esModule", {
@@ -5351,7 +5439,7 @@ function isUppercase(str) {
5351
5439
  return str === str.toUpperCase();
5352
5440
  }
5353
5441
  module.exports = exports['default'];
5354
- },{"./util/assertString":71}],58:[function(require,module,exports){
5442
+ },{"./util/assertString":73}],60:[function(require,module,exports){
5355
5443
  'use strict';
5356
5444
 
5357
5445
  Object.defineProperty(exports, "__esModule", {
@@ -5374,7 +5462,7 @@ function isVariableWidth(str) {
5374
5462
  return _isFullWidth.fullWidth.test(str) && _isHalfWidth.halfWidth.test(str);
5375
5463
  }
5376
5464
  module.exports = exports['default'];
5377
- },{"./isFullWidth":27,"./isHalfWidth":28,"./util/assertString":71}],59:[function(require,module,exports){
5465
+ },{"./isFullWidth":27,"./isHalfWidth":28,"./util/assertString":73}],61:[function(require,module,exports){
5378
5466
  'use strict';
5379
5467
 
5380
5468
  Object.defineProperty(exports, "__esModule", {
@@ -5398,7 +5486,7 @@ function isWhitelisted(str, chars) {
5398
5486
  return true;
5399
5487
  }
5400
5488
  module.exports = exports['default'];
5401
- },{"./util/assertString":71}],60:[function(require,module,exports){
5489
+ },{"./util/assertString":73}],62:[function(require,module,exports){
5402
5490
  'use strict';
5403
5491
 
5404
5492
  Object.defineProperty(exports, "__esModule", {
@@ -5418,7 +5506,7 @@ function ltrim(str, chars) {
5418
5506
  return str.replace(pattern, '');
5419
5507
  }
5420
5508
  module.exports = exports['default'];
5421
- },{"./util/assertString":71}],61:[function(require,module,exports){
5509
+ },{"./util/assertString":73}],63:[function(require,module,exports){
5422
5510
  'use strict';
5423
5511
 
5424
5512
  Object.defineProperty(exports, "__esModule", {
@@ -5440,7 +5528,7 @@ function matches(str, pattern, modifiers) {
5440
5528
  return pattern.test(str);
5441
5529
  }
5442
5530
  module.exports = exports['default'];
5443
- },{"./util/assertString":71}],62:[function(require,module,exports){
5531
+ },{"./util/assertString":73}],64:[function(require,module,exports){
5444
5532
  'use strict';
5445
5533
 
5446
5534
  Object.defineProperty(exports, "__esModule", {
@@ -5483,6 +5571,10 @@ var default_normalize_email_options = {
5483
5571
  // Removes the subaddress (e.g. "-foo") from the email address
5484
5572
  yahoo_remove_subaddress: true,
5485
5573
 
5574
+ // The following conversions are specific to Yandex
5575
+ // Lowercases the local part of the Yandex address (known to be case-insensitive)
5576
+ yandex_lowercase: true,
5577
+
5486
5578
  // The following conversions are specific to iCloud
5487
5579
  // Lowercases the local part of the iCloud address (known to be case-insensitive)
5488
5580
  icloud_lowercase: true,
@@ -5503,6 +5595,17 @@ var outlookdotcom_domains = ['hotmail.at', 'hotmail.be', 'hotmail.ca', 'hotmail.
5503
5595
  // This list is likely incomplete
5504
5596
  var yahoo_domains = ['rocketmail.com', 'yahoo.ca', 'yahoo.co.uk', 'yahoo.com', 'yahoo.de', 'yahoo.fr', 'yahoo.in', 'yahoo.it', 'ymail.com'];
5505
5597
 
5598
+ // List of domains used by yandex.ru
5599
+ var yandex_domains = ['yandex.ru', 'yandex.ua', 'yandex.kz', 'yandex.com', 'yandex.by', 'ya.ru'];
5600
+
5601
+ // replace single dots, but not multiple consecutive dots
5602
+ function dotsReplacer(match) {
5603
+ if (match.length > 1) {
5604
+ return match;
5605
+ }
5606
+ return '';
5607
+ }
5608
+
5506
5609
  function normalizeEmail(email, options) {
5507
5610
  options = (0, _merge2.default)(options, default_normalize_email_options);
5508
5611
 
@@ -5520,7 +5623,8 @@ function normalizeEmail(email, options) {
5520
5623
  parts[0] = parts[0].split('+')[0];
5521
5624
  }
5522
5625
  if (options.gmail_remove_dots) {
5523
- parts[0] = parts[0].replace(/\./g, '');
5626
+ // this does not replace consecutive dots like example..email@gmail.com
5627
+ parts[0] = parts[0].replace(/\.+/g, dotsReplacer);
5524
5628
  }
5525
5629
  if (!parts[0].length) {
5526
5630
  return false;
@@ -5563,6 +5667,11 @@ function normalizeEmail(email, options) {
5563
5667
  if (options.all_lowercase || options.yahoo_lowercase) {
5564
5668
  parts[0] = parts[0].toLowerCase();
5565
5669
  }
5670
+ } else if (~yandex_domains.indexOf(parts[1])) {
5671
+ if (options.all_lowercase || options.yandex_lowercase) {
5672
+ parts[0] = parts[0].toLowerCase();
5673
+ }
5674
+ parts[1] = 'yandex.ru'; // all yandex domains are equal, 1st preffered
5566
5675
  } else if (options.all_lowercase) {
5567
5676
  // Any other address
5568
5677
  parts[0] = parts[0].toLowerCase();
@@ -5570,7 +5679,7 @@ function normalizeEmail(email, options) {
5570
5679
  return parts.join('@');
5571
5680
  }
5572
5681
  module.exports = exports['default'];
5573
- },{"./util/merge":72}],63:[function(require,module,exports){
5682
+ },{"./util/merge":74}],65:[function(require,module,exports){
5574
5683
  'use strict';
5575
5684
 
5576
5685
  Object.defineProperty(exports, "__esModule", {
@@ -5596,7 +5705,7 @@ function rtrim(str, chars) {
5596
5705
  return idx < str.length ? str.substr(0, idx + 1) : str;
5597
5706
  }
5598
5707
  module.exports = exports['default'];
5599
- },{"./util/assertString":71}],64:[function(require,module,exports){
5708
+ },{"./util/assertString":73}],66:[function(require,module,exports){
5600
5709
  'use strict';
5601
5710
 
5602
5711
  Object.defineProperty(exports, "__esModule", {
@@ -5620,7 +5729,7 @@ function stripLow(str, keep_new_lines) {
5620
5729
  return (0, _blacklist2.default)(str, chars);
5621
5730
  }
5622
5731
  module.exports = exports['default'];
5623
- },{"./blacklist":6,"./util/assertString":71}],65:[function(require,module,exports){
5732
+ },{"./blacklist":6,"./util/assertString":73}],67:[function(require,module,exports){
5624
5733
  'use strict';
5625
5734
 
5626
5735
  Object.defineProperty(exports, "__esModule", {
@@ -5642,7 +5751,7 @@ function toBoolean(str, strict) {
5642
5751
  return str !== '0' && str !== 'false' && str !== '';
5643
5752
  }
5644
5753
  module.exports = exports['default'];
5645
- },{"./util/assertString":71}],66:[function(require,module,exports){
5754
+ },{"./util/assertString":73}],68:[function(require,module,exports){
5646
5755
  'use strict';
5647
5756
 
5648
5757
  Object.defineProperty(exports, "__esModule", {
@@ -5662,7 +5771,7 @@ function toDate(date) {
5662
5771
  return !isNaN(date) ? new Date(date) : null;
5663
5772
  }
5664
5773
  module.exports = exports['default'];
5665
- },{"./util/assertString":71}],67:[function(require,module,exports){
5774
+ },{"./util/assertString":73}],69:[function(require,module,exports){
5666
5775
  'use strict';
5667
5776
 
5668
5777
  Object.defineProperty(exports, "__esModule", {
@@ -5681,7 +5790,7 @@ function toFloat(str) {
5681
5790
  return parseFloat(str);
5682
5791
  }
5683
5792
  module.exports = exports['default'];
5684
- },{"./util/assertString":71}],68:[function(require,module,exports){
5793
+ },{"./util/assertString":73}],70:[function(require,module,exports){
5685
5794
  'use strict';
5686
5795
 
5687
5796
  Object.defineProperty(exports, "__esModule", {
@@ -5700,7 +5809,7 @@ function toInt(str, radix) {
5700
5809
  return parseInt(str, radix || 10);
5701
5810
  }
5702
5811
  module.exports = exports['default'];
5703
- },{"./util/assertString":71}],69:[function(require,module,exports){
5812
+ },{"./util/assertString":73}],71:[function(require,module,exports){
5704
5813
  'use strict';
5705
5814
 
5706
5815
  Object.defineProperty(exports, "__esModule", {
@@ -5722,7 +5831,7 @@ function trim(str, chars) {
5722
5831
  return (0, _rtrim2.default)((0, _ltrim2.default)(str, chars), chars);
5723
5832
  }
5724
5833
  module.exports = exports['default'];
5725
- },{"./ltrim":60,"./rtrim":63}],70:[function(require,module,exports){
5834
+ },{"./ltrim":62,"./rtrim":65}],72:[function(require,module,exports){
5726
5835
  'use strict';
5727
5836
 
5728
5837
  Object.defineProperty(exports, "__esModule", {
@@ -5741,7 +5850,7 @@ function unescape(str) {
5741
5850
  return str.replace(/&amp;/g, '&').replace(/&quot;/g, '"').replace(/&#x27;/g, "'").replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&#x2F;/g, '/').replace(/&#x5C;/g, '\\').replace(/&#96;/g, '`');
5742
5851
  }
5743
5852
  module.exports = exports['default'];
5744
- },{"./util/assertString":71}],71:[function(require,module,exports){
5853
+ },{"./util/assertString":73}],73:[function(require,module,exports){
5745
5854
  'use strict';
5746
5855
 
5747
5856
  Object.defineProperty(exports, "__esModule", {
@@ -5756,7 +5865,7 @@ function assertString(input) {
5756
5865
  }
5757
5866
  }
5758
5867
  module.exports = exports['default'];
5759
- },{}],72:[function(require,module,exports){
5868
+ },{}],74:[function(require,module,exports){
5760
5869
  'use strict';
5761
5870
 
5762
5871
  Object.defineProperty(exports, "__esModule", {
@@ -5775,7 +5884,7 @@ function merge() {
5775
5884
  return obj;
5776
5885
  }
5777
5886
  module.exports = exports['default'];
5778
- },{}],73:[function(require,module,exports){
5887
+ },{}],75:[function(require,module,exports){
5779
5888
  'use strict';
5780
5889
 
5781
5890
  Object.defineProperty(exports, "__esModule", {
@@ -5798,7 +5907,7 @@ function toString(input) {
5798
5907
  return String(input);
5799
5908
  }
5800
5909
  module.exports = exports['default'];
5801
- },{}],74:[function(require,module,exports){
5910
+ },{}],76:[function(require,module,exports){
5802
5911
  'use strict';
5803
5912
 
5804
5913
  Object.defineProperty(exports, "__esModule", {
@@ -5817,7 +5926,7 @@ function whitelist(str, chars) {
5817
5926
  return str.replace(new RegExp('[^' + chars + ']+', 'g'), '');
5818
5927
  }
5819
5928
  module.exports = exports['default'];
5820
- },{"./util/assertString":71}],75:[function(require,module,exports){
5929
+ },{"./util/assertString":73}],77:[function(require,module,exports){
5821
5930
  "use strict";
5822
5931
 
5823
5932
  module.exports = {
@@ -5879,7 +5988,7 @@ module.exports = {
5879
5988
 
5880
5989
  };
5881
5990
 
5882
- },{}],76:[function(require,module,exports){
5991
+ },{}],78:[function(require,module,exports){
5883
5992
  /*jshint maxlen: false*/
5884
5993
 
5885
5994
  var validator = require("validator");
@@ -6010,7 +6119,7 @@ var FormatValidators = {
6010
6119
 
6011
6120
  module.exports = FormatValidators;
6012
6121
 
6013
- },{"validator":4}],77:[function(require,module,exports){
6122
+ },{"validator":4}],79:[function(require,module,exports){
6014
6123
  "use strict";
6015
6124
 
6016
6125
  var FormatValidators = require("./FormatValidators"),
@@ -6558,7 +6667,7 @@ exports.validate = function (report, schema, json) {
6558
6667
 
6559
6668
  };
6560
6669
 
6561
- },{"./FormatValidators":76,"./Report":79,"./Utils":83}],78:[function(require,module,exports){
6670
+ },{"./FormatValidators":78,"./Report":81,"./Utils":85}],80:[function(require,module,exports){
6562
6671
  // Number.isFinite polyfill
6563
6672
  // http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite
6564
6673
  if (typeof Number.isFinite !== "function") {
@@ -6576,7 +6685,7 @@ if (typeof Number.isFinite !== "function") {
6576
6685
  };
6577
6686
  }
6578
6687
 
6579
- },{}],79:[function(require,module,exports){
6688
+ },{}],81:[function(require,module,exports){
6580
6689
  (function (process){
6581
6690
  "use strict";
6582
6691
 
@@ -6783,7 +6892,7 @@ Report.prototype.addCustomError = function (errorCode, errorMessage, params, sub
6783
6892
  module.exports = Report;
6784
6893
 
6785
6894
  }).call(this,require('_process'))
6786
- },{"./Errors":75,"./Utils":83,"_process":3,"lodash.get":1}],80:[function(require,module,exports){
6895
+ },{"./Errors":77,"./Utils":85,"_process":3,"lodash.get":1}],82:[function(require,module,exports){
6787
6896
  "use strict";
6788
6897
 
6789
6898
  var isequal = require("lodash.isequal");
@@ -6947,7 +7056,7 @@ exports.getSchemaByUri = function (report, uri, root) {
6947
7056
 
6948
7057
  exports.getRemotePath = getRemotePath;
6949
7058
 
6950
- },{"./Report":79,"./SchemaCompilation":81,"./SchemaValidation":82,"./Utils":83,"lodash.isequal":2}],81:[function(require,module,exports){
7059
+ },{"./Report":81,"./SchemaCompilation":83,"./SchemaValidation":84,"./Utils":85,"lodash.isequal":2}],83:[function(require,module,exports){
6951
7060
  "use strict";
6952
7061
 
6953
7062
  var Report = require("./Report");
@@ -7248,7 +7357,7 @@ exports.compileSchema = function (report, schema) {
7248
7357
 
7249
7358
  };
7250
7359
 
7251
- },{"./Report":79,"./SchemaCache":80,"./Utils":83}],82:[function(require,module,exports){
7360
+ },{"./Report":81,"./SchemaCache":82,"./Utils":85}],84:[function(require,module,exports){
7252
7361
  "use strict";
7253
7362
 
7254
7363
  var FormatValidators = require("./FormatValidators"),
@@ -7857,7 +7966,7 @@ exports.validateSchema = function (report, schema) {
7857
7966
  return isValid;
7858
7967
  };
7859
7968
 
7860
- },{"./FormatValidators":76,"./JsonValidation":77,"./Report":79,"./Utils":83}],83:[function(require,module,exports){
7969
+ },{"./FormatValidators":78,"./JsonValidation":79,"./Report":81,"./Utils":85}],85:[function(require,module,exports){
7861
7970
  "use strict";
7862
7971
 
7863
7972
  exports.isAbsoluteUri = function (uri) {
@@ -8086,7 +8195,7 @@ exports.ucs2decode = function (string) {
8086
8195
  };
8087
8196
  /*jshint +W016*/
8088
8197
 
8089
- },{}],84:[function(require,module,exports){
8198
+ },{}],86:[function(require,module,exports){
8090
8199
  (function (process){
8091
8200
  "use strict";
8092
8201
 
@@ -8204,6 +8313,7 @@ function normalizeOptions(options) {
8204
8313
  function ZSchema(options) {
8205
8314
  this.cache = {};
8206
8315
  this.referenceCache = [];
8316
+ this.validateOptions = {};
8207
8317
 
8208
8318
  this.options = normalizeOptions(options);
8209
8319
 
@@ -8250,6 +8360,8 @@ ZSchema.prototype.validate = function (json, schema, options, callback) {
8250
8360
  }
8251
8361
  if (!options) { options = {}; }
8252
8362
 
8363
+ this.validateOptions = options;
8364
+
8253
8365
  var whatIs = Utils.whatIs(schema);
8254
8366
  if (whatIs !== "string" && whatIs !== "object") {
8255
8367
  var e = new Error("Invalid .validate call - schema must be an string or object but " + whatIs + " was passed!");
@@ -8459,7 +8571,7 @@ ZSchema.getDefaultOptions = function () {
8459
8571
  module.exports = ZSchema;
8460
8572
 
8461
8573
  }).call(this,require('_process'))
8462
- },{"./FormatValidators":76,"./JsonValidation":77,"./Polyfills":78,"./Report":79,"./SchemaCache":80,"./SchemaCompilation":81,"./SchemaValidation":82,"./Utils":83,"./schemas/hyper-schema.json":85,"./schemas/schema.json":86,"_process":3,"lodash.get":1}],85:[function(require,module,exports){
8574
+ },{"./FormatValidators":78,"./JsonValidation":79,"./Polyfills":80,"./Report":81,"./SchemaCache":82,"./SchemaCompilation":83,"./SchemaValidation":84,"./Utils":85,"./schemas/hyper-schema.json":87,"./schemas/schema.json":88,"_process":3,"lodash.get":1}],87:[function(require,module,exports){
8463
8575
  module.exports={
8464
8576
  "$schema": "http://json-schema.org/draft-04/hyper-schema#",
8465
8577
  "id": "http://json-schema.org/draft-04/hyper-schema#",
@@ -8619,7 +8731,7 @@ module.exports={
8619
8731
  }
8620
8732
 
8621
8733
 
8622
- },{}],86:[function(require,module,exports){
8734
+ },{}],88:[function(require,module,exports){
8623
8735
  module.exports={
8624
8736
  "id": "http://json-schema.org/draft-04/schema#",
8625
8737
  "$schema": "http://json-schema.org/draft-04/schema#",
@@ -8772,5 +8884,5 @@ module.exports={
8772
8884
  "default": {}
8773
8885
  }
8774
8886
 
8775
- },{}]},{},[75,76,77,78,79,80,81,82,83,84])(84)
8887
+ },{}]},{},[77,78,79,80,81,82,83,84,85,86])(86)
8776
8888
  });