@commodo/fields
Advanced tools
Comparing version 1.1.2-beta.14 to 1.1.2-beta.15
@@ -215,7 +215,24 @@ "use strict"; | ||
if (this.list) { | ||
const errors = []; | ||
for (let i = 0; i < this.current.length; i++) { | ||
const current = this.current[i]; | ||
current && (await current.validate()); | ||
try { | ||
current && (await current.validate()); | ||
} catch (e) { | ||
errors.push({ | ||
code: e.code, | ||
data: _objectSpread({ | ||
index: i | ||
}, e.data), | ||
message: e.message | ||
}); | ||
} | ||
} | ||
if (errors.length > 0) { | ||
throw new _WithFieldsError.default("Validation failed.", _WithFieldsError.default.VALIDATION_FAILED_INVALID_FIELD, errors); | ||
} | ||
return; | ||
@@ -222,0 +239,0 @@ } |
{ | ||
"name": "@commodo/fields", | ||
"version": "1.1.2-beta.14", | ||
"version": "1.1.2-beta.15", | ||
"main": "index.js", | ||
@@ -14,3 +14,3 @@ "repository": { | ||
"dependencies": { | ||
"@commodo/name": "^1.2.2-beta.14", | ||
"@commodo/name": "^1.2.2-beta.15", | ||
"repropose": "^1.0.2" | ||
@@ -34,3 +34,3 @@ }, | ||
}, | ||
"gitHead": "98ce707da957061cb6e39cbc90cc82b394ff156c" | ||
"gitHead": "1de3aa339ef6273938b66c33b5985699f5932fb1" | ||
} |
Sorry, the diff of this file is not supported yet
82594
822
Updated@commodo/name@^1.2.2-beta.15