@ukhomeoffice/cop-react-form-renderer 4.30.0 → 4.31.0
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.
|
@@ -292,9 +292,10 @@ var InternalFormRenderer = function InternalFormRenderer(_ref2) {
|
|
|
292
292
|
}, [currentTask.fullPages, data, hubDetails === null || hubDetails === void 0 ? void 0 : hubDetails.sections, hubDetails === null || hubDetails === void 0 ? void 0 : hubDetails.nonSequential]);
|
|
293
293
|
|
|
294
294
|
var onPageChange = function onPageChange(newPageId) {
|
|
295
|
+
var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
295
296
|
clearErrors();
|
|
296
297
|
setPageId(newPageId);
|
|
297
|
-
hooks.onPageChange(newPageId);
|
|
298
|
+
hooks.onPageChange(newPageId, state);
|
|
298
299
|
};
|
|
299
300
|
|
|
300
301
|
(0, _react.useEffect)(function () {
|
|
@@ -28,7 +28,7 @@ var validateEmail = function validateEmail(value) {
|
|
|
28
28
|
|
|
29
29
|
if (typeof value === 'string') {
|
|
30
30
|
// The following is an interim fix pending a mechanism for validating against specific values
|
|
31
|
-
if (['Line manager email', 'Delegate email address'].includes(label) && value === userEmail) {
|
|
31
|
+
if (['Line manager email', 'Delegate email address'].includes(label) && value.toLowerCase() === userEmail) {
|
|
32
32
|
return "".concat(label, " cannot be the same as the user email address");
|
|
33
33
|
}
|
|
34
34
|
|