@hestia-earth/ui-components 0.43.2 → 0.43.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.
@@ -627,12 +627,16 @@ const createErrorFormatter = ({ renderer: r, urls }) => {
627
627
  ? `This field can only be added to the ${schemaLink('Transformation#inputs', 'inputs of a Transformation')}.`
628
628
  : schema?.required?.includes('otherSites')
629
629
  ? `Please only specify a single ${schemaLink('Cycle#site', 'site')} when the functional unit is ${code(CycleFunctionalUnit['1 ha'])}.`
630
- : // termType restriction on the item
631
- schema?.properties?.term?.properties?.termType?.enum?.length
632
- ? `This ${code('termType')} is not allowed here.`
633
- : schema?.required
634
- ? `The following ${pluralize('field', schema.required.length)} should not be used: ${listAsCode(schema.required)}`
635
- : 'Should not be used in this case.',
630
+ : schema?.required?.includes('functionalArea')
631
+ ? `The ${code('functionalArea')} field should only be used when ${code('site.area')} is missing. The
632
+ ${code('mass')}/${code('area')}/${code('inputs')} should be expressed per the ${code('site.area')},
633
+ and the ${code('functionalArea')} field should be removed.`
634
+ : // termType restriction on the item
635
+ schema?.properties?.term?.properties?.termType?.enum?.length
636
+ ? `This ${code('termType')} is not allowed here.`
637
+ : schema?.required
638
+ ? `The following ${pluralize('field', schema.required.length)} should not be used: ${listAsCode(schema.required)}`
639
+ : 'Should not be used in this case.',
636
640
  [patternErrorKey('^[0-9]{4}(-01)?(-01)?$')]: () => 'should be the first month/day of the year',
637
641
  [patternErrorKey('^\\d{13}$')]: () => 'should be composed of 13 numbers',
638
642
  'not a valid date': () => dateFormatMessage,