@ukhomeoffice/cop-react-form-renderer 5.8.0 → 5.8.1

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.
@@ -75,11 +75,11 @@ var ValidationContextProvider = function ValidationContextProvider(_ref) {
75
75
  return allErrors;
76
76
  },
77
77
  pages: function pages(_pages) {
78
- var pagesErrors = _pages.flatMap(function (page) {
78
+ var allPagesErrors = _pages.map(function (page) {
79
79
  return _utils.default.Validate.page(page);
80
80
  });
81
- var allErrors = _pages.flatMap(function (page) {
82
- return hooks.onValidate(page, pagesErrors);
81
+ var allErrors = _pages.flatMap(function (page, index) {
82
+ return hooks.onValidate(page, allPagesErrors[index]);
83
83
  });
84
84
  setErrors(allErrors);
85
85
  return allErrors;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ukhomeoffice/cop-react-form-renderer",
3
- "version": "5.8.0",
3
+ "version": "5.8.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "clean": "rimraf dist",