@abgov/jsonforms-components 2.68.0 → 2.68.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.
package/index.esm.js CHANGED
@@ -10497,6 +10497,15 @@ const GoAInputBaseTableReview = props => {
10497
10497
  if (!activeError && typeof errors === 'string' && errors.trim() !== '') {
10498
10498
  activeError = errors;
10499
10499
  }
10500
+ // A required field with no user-entered value should always show the required error, even when
10501
+ // another AJV rule (e.g. minLength) also fires against the empty value — required takes priority
10502
+ // over any other validation message. isNilOrEmptyValue deliberately doesn't treat boolean `false`
10503
+ // as empty, so an unchecked required checkbox still falls through to the boolean-specific handling
10504
+ // below instead of being clobbered here.
10505
+ if (required && isNilOrEmptyValue(data, true)) {
10506
+ // clean-code-ignore: 2.18
10507
+ activeError = `${labelToUpdate} is required`;
10508
+ }
10500
10509
  const isRegisterBackedEnumFalsePositive = (uischema == null || (_uischema$options4 = uischema.options) == null ? void 0 : _uischema$options4.register) !== undefined && !isNilOrEmptyValue(data, true) && typeof activeError === 'string' && activeError.toLowerCase().includes('must be equal to one of the allowed values');
10501
10510
  if (isRegisterBackedEnumFalsePositive) {
10502
10511
  activeError = undefined;
@@ -10509,9 +10518,6 @@ const GoAInputBaseTableReview = props => {
10509
10518
  if ((schema == null ? void 0 : schema.type) === 'boolean' && activeError && activeError.toLowerCase().includes('must be equal')) {
10510
10519
  activeError = data === false ? `${labelToUpdate} is required` : undefined;
10511
10520
  }
10512
- if (required && isNilOrEmptyValue(data, true) && !activeError) {
10513
- activeError = `${labelToUpdate} is required`;
10514
- }
10515
10521
  // If a required checkbox is unchecked, show only the validation message in
10516
10522
  // review mode (not a contradictory "No (...)" value line).
10517
10523
  let isBooleanRequiredError = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.68.0",
3
+ "version": "2.68.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
6
6
  "repository": "https://github.com/GovAlta/adsp-monorepo",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-07-09T17:56:36.899Z",
4
- "sourceCommit": "14da8d8d672299c489c33a8a1cfc98b795abd682",
3
+ "generatedAt": "2026-07-09T20:09:22.767Z",
4
+ "sourceCommit": "5d8a7ba85bedb14a77786d3941256a92e2074f6b",
5
5
  "sourcePath": "libs/jsonforms-components/src/index.ts",
6
6
  "rendererCount": 33,
7
7
  "renderers": [