bcx-validation
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -0,1 +1,10 @@ | ||
## [1.3.3](https://github.com/buttonwoodcx/bcx-validation/compare/v1.3.2...v1.3.3) (2020-09-15) | ||
### Bug Fixes | ||
* support object value in within, notIn and unique validators ([752c3f2](https://github.com/buttonwoodcx/bcx-validation/commit/752c3f261953cad046df295d75d382aacf9c2b88)) | ||
## [1.3.2](https://github.com/buttonwoodcx/bcx-validation/compare/v1.3.1...v1.3.2) (2020-05-19) | ||
@@ -2,0 +11,0 @@ |
@@ -40,3 +40,3 @@ "use strict"; | ||
function startup() { | ||
return __webpack_require__(854); | ||
return __webpack_require__(199); | ||
} | ||
@@ -50,6 +50,3 @@ | ||
}, | ||
804: function _(i) { | ||
i.exports = require("lodash"); | ||
}, | ||
854: function _(i, t, e) { | ||
199: function _(i, t, e) { | ||
"use strict"; | ||
@@ -95,3 +92,3 @@ | ||
function modifiedOverrideContext(i, t) { | ||
return _extends(_extends({}, i), t); | ||
return _extends({}, i, t); | ||
} | ||
@@ -322,3 +319,3 @@ | ||
var v = function v(i) { | ||
var g = function g(i) { | ||
if (!a().has(i, "switch")) return false; | ||
@@ -330,3 +327,3 @@ if (!a().has(i, "cases")) return false; | ||
var g = function g(i, t, e) { | ||
var v = function v(i, t, e) { | ||
var n = a().get(i, "switch"); | ||
@@ -345,3 +342,3 @@ var r = a().get(i, "cases"); | ||
var v = function v(i) { | ||
var g = function g(i) { | ||
var t = i.overrideContext.$value; | ||
@@ -374,4 +371,4 @@ var e, n; | ||
v.readyToUse = true; | ||
return v; | ||
g.readyToUse = true; | ||
return g; | ||
}; | ||
@@ -411,3 +408,3 @@ | ||
var m = Object(s.createOverrideContext)(f, c); | ||
var v = a().filter(o, function (i, t) { | ||
var g = a().filter(o, function (i, t) { | ||
return t !== l; | ||
@@ -418,4 +415,4 @@ }); | ||
$propertyPath: null, | ||
$neighbours: v, | ||
$neighbourValues: v, | ||
$neighbours: g, | ||
$neighbourValues: g, | ||
$index: l, | ||
@@ -425,8 +422,8 @@ $first: l === 0, | ||
}); | ||
var g = { | ||
var v = { | ||
bindingContext: f, | ||
overrideContext: m | ||
}; | ||
var $ = u(g); | ||
var h = (r || t(n(g)))(g); | ||
var $ = u(v); | ||
var h = (r || t(n(v)))(v); | ||
@@ -449,3 +446,3 @@ if (h.isValid === false) { | ||
i.addTransformer(c, m); | ||
i.addTransformer(v, g); | ||
i.addTransformer(g, v); | ||
i.addTransformer($, h); | ||
@@ -582,4 +579,4 @@ i.addTransformer(a.a.isRegExp, function (i) { | ||
validate: "isTrue", | ||
value: "_.includes($items, $value)", | ||
message: "must be one of ${_.join($items, ', ')}" | ||
value: "_.differenceWith([$value], $items, _.isEqual).length === 0", | ||
message: "must be one of ${_.join(_.map($items, JSON.stringify), ', ')}" | ||
}, { | ||
@@ -589,3 +586,3 @@ "if": "$caseInsensitive", | ||
value: "_.includes(_.map($items, _.toLower), _.toLower($value))", | ||
message: "must be one of ${_.join($items, ', ')}" | ||
message: "must be one of ${_.join(_.map($items, JSON.stringify), ', ')}" | ||
}]); | ||
@@ -595,4 +592,4 @@ i.addValidator("notIn", [{ | ||
validate: "isFalse", | ||
value: "_.includes($items, $value)", | ||
message: "must not be one of ${_.join($items, ', ')}" | ||
value: "_.differenceWith([$value], $items, _.isEqual).length === 0", | ||
message: "must not be one of ${_.join(_.map($items, JSON.stringify), ', ')}" | ||
}, { | ||
@@ -602,3 +599,3 @@ "if": "$caseInsensitive", | ||
value: "_.includes(_.map($items, _.toLower), _.toLower($value))", | ||
message: "must not be one of ${_.join($items, ', ')}" | ||
message: "must not be one of ${_.join(_.map($items, JSON.stringify), ', ')}" | ||
}]); | ||
@@ -665,3 +662,4 @@ i.addValidator("contain", [{ | ||
var V = "validation name must start with a letter, followed by letters, digits or underscore (_)"; | ||
var T = l(function () { | ||
var _ = l(function () { | ||
return undefined; | ||
@@ -845,3 +843,3 @@ }); | ||
var e = Object(s.createSimpleScope)(i, _extends(_extends(_extends({}, validation_Validation.sharedHelpers), this.helpers), t)); | ||
var e = Object(s.createSimpleScope)(i, _extends({}, validation_Validation.sharedHelpers, this.helpers, t)); | ||
a().merge(e.overrideContext, { | ||
@@ -869,3 +867,3 @@ $value: i, | ||
if (a().isUndefined(i) || a().isNull(i)) return T; | ||
if (a().isUndefined(i) || a().isNull(i)) return _; | ||
var e = this.buildValidator(i, t); | ||
@@ -922,3 +920,3 @@ if (e) return e; | ||
get: function get() { | ||
return _extends(_extends({}, validation_Validation._validators), this._validators); | ||
return _extends({}, validation_Validation._validators, this._validators); | ||
} | ||
@@ -928,3 +926,3 @@ }, { | ||
get: function get() { | ||
return _extends(_extends({}, validation_Validation._helpers), this._helpers); | ||
return _extends({}, validation_Validation._helpers, this._helpers); | ||
} | ||
@@ -944,7 +942,11 @@ }]); | ||
validation_Validation.addHelper("_", a.a); | ||
var k = validation_Validation; | ||
validation_Validation.addHelper("JSON", JSON); | ||
var T = validation_Validation; | ||
e.d(t, "default", function () { | ||
return _; | ||
return k; | ||
}); | ||
var _ = k; | ||
var k = T; | ||
}, | ||
804: function _(i) { | ||
i.exports = require("lodash"); | ||
} | ||
@@ -951,0 +953,0 @@ }, function (i) { |
{ | ||
"name": "bcx-validation", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "Buttonwood validator", | ||
@@ -19,12 +19,12 @@ "keywords": [ | ||
"devDependencies": { | ||
"@babel/core": "^7.9.6", | ||
"@babel/preset-env": "^7.9.6", | ||
"@babel/register": "^7.9.0", | ||
"@babel/cli": "^7.8.4", | ||
"@zeit/ncc": "^0.22.2", | ||
"@babel/core": "^7.11.6", | ||
"@babel/preset-env": "^7.11.5", | ||
"@babel/register": "^7.11.5", | ||
"@babel/cli": "^7.11.6", | ||
"@vercel/ncc": "^0.23.0", | ||
"babel-eslint": "^10.1.0", | ||
"eslint": "^7.0.0", | ||
"eslint": "^7.9.0", | ||
"standard-changelog": "^2.0.24", | ||
"tap-nirvana": "^1.1.0", | ||
"tape": "^5.0.0" | ||
"tape": "^5.0.1" | ||
}, | ||
@@ -50,4 +50,4 @@ "scripts": { | ||
"bcx-expression-evaluator": "^1.2.1", | ||
"lodash": "^4.17.15" | ||
"lodash": "^4.17.20" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
38010
861
0
Updatedlodash@^4.17.20