hof 22.11.6-unit-of-measure-beta.2 → 22.11.6-unit-of-measure-beta.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.
@@ -173,8 +173,11 @@ const constructFieldToRender = (req, fields, options, key) => {
173
173
  reqForm.options.fields[`${key}`]?.hint;
174
174
  const legendClassName = getLegendClassName(options);
175
175
  const isPageHeading = getIsPageHeading(options);
176
- const error = reqForm.errors &&
177
- (reqForm.errors[key] || reqForm.errors[`${key}-amount`] || reqForm.errors[`${key}-unit`]);
176
+ const error = reqForm.errors && (
177
+ (reqForm.errors[key]?.type && reqForm.errors[key]) ||
178
+ reqForm.errors[`${key}-amount`]?.type && reqForm.errors[`${key}-amount`] ||
179
+ reqForm.errors[`${key}-unit`]?.type && reqForm.errors[`${key}-unit`]
180
+ );
178
181
 
179
182
  return { key, legend, legendClassName, isPageHeading, hint, error };
180
183
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "22.11.6-unit-of-measure-beta.2",
4
+ "version": "22.11.6-unit-of-measure-beta.3",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",