@opencrvs/toolkit 2.0.0-rc.fce1cc5 → 2.0.0-rc.fd1d25d

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.
@@ -3526,9 +3526,11 @@ var z30 = __toESM(require("zod/v4"));
3526
3526
  var z29 = __toESM(require("zod/v4"));
3527
3527
  function getDynamicNameValue(field3) {
3528
3528
  const nameConfiguration = field3.configuration?.name;
3529
+ const firstnameRequired = nameConfiguration?.firstname?.required ?? field3.required;
3530
+ const surnameRequired = nameConfiguration?.surname?.required ?? field3.required;
3529
3531
  return z29.object({
3530
- firstname: nameConfiguration?.firstname?.required ? NonEmptyTextValue : TextValue,
3531
- surname: nameConfiguration?.surname?.required ? NonEmptyTextValue : TextValue,
3532
+ firstname: firstnameRequired ? NonEmptyTextValue : TextValue,
3533
+ surname: surnameRequired ? NonEmptyTextValue : TextValue,
3532
3534
  middlename: nameConfiguration?.middlename?.required ? NonEmptyTextValue : TextValue.optional()
3533
3535
  });
3534
3536
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "2.0.0-rc.fce1cc5",
3
+ "version": "2.0.0-rc.fd1d25d",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {