@ukhomeoffice/cop-react-form-renderer 4.22.2 → 4.22.3
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.
|
@@ -44,7 +44,10 @@ var validateContainer = function validateContainer(container, outerData, formDat
|
|
|
44
44
|
if (Array.isArray(container.components)) {
|
|
45
45
|
var containerData = outerData && container.fieldId ? outerData[container.fieldId] : outerData;
|
|
46
46
|
container.components.forEach(function (component) {
|
|
47
|
-
|
|
47
|
+
// It is possible that the container being passed in is a
|
|
48
|
+
// dummy container just for validation. In that scenario we want
|
|
49
|
+
// to ignore the full_path and just use the component's fieldId.
|
|
50
|
+
var full_path = container.full_path || container.fieldId ? "".concat(container.full_path || container.fieldId, ".").concat(component.fieldId) : component.fieldId;
|
|
48
51
|
errors.push((0, _validateComponent.default)(_objectSpread(_objectSpread({}, component), {}, {
|
|
49
52
|
full_path: full_path
|
|
50
53
|
}), containerData, fd));
|