@forzalabs/remora 0.0.22 → 0.0.23
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.
- package/Constants.js +1 -1
- package/engines/validation/Validator.js +10 -3
- package/package.json +1 -1
package/Constants.js
CHANGED
|
@@ -130,9 +130,16 @@ class ValidatorClass {
|
|
|
130
130
|
const errors = [];
|
|
131
131
|
const trxsFields = fields.filter(x => x.transform);
|
|
132
132
|
for (const field of trxsFields) {
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
135
|
-
|
|
133
|
+
const trxToValidate = [];
|
|
134
|
+
if (Array.isArray(field.transform))
|
|
135
|
+
trxToValidate.push(...field.transform);
|
|
136
|
+
else
|
|
137
|
+
trxToValidate.push(field.transform);
|
|
138
|
+
for (const trans of trxToValidate) {
|
|
139
|
+
const trxKeys = Object.keys(trans);
|
|
140
|
+
if (trxKeys.length !== 1)
|
|
141
|
+
errors.push(`There can only be 1 transformation type in your transformation pipeline. Field "${field.key}" got ${trxKeys.length}`);
|
|
142
|
+
}
|
|
136
143
|
}
|
|
137
144
|
return errors;
|
|
138
145
|
};
|