@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.
package/dist/events/index.js
CHANGED
|
@@ -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:
|
|
3531
|
-
surname:
|
|
3532
|
+
firstname: firstnameRequired ? NonEmptyTextValue : TextValue,
|
|
3533
|
+
surname: surnameRequired ? NonEmptyTextValue : TextValue,
|
|
3532
3534
|
middlename: nameConfiguration?.middlename?.required ? NonEmptyTextValue : TextValue.optional()
|
|
3533
3535
|
});
|
|
3534
3536
|
}
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|