Revert "Common - Field validation (#15491)" (#15821)

This reverts commit 261cba40ef.
This commit is contained in:
martmull
2025-11-14 13:47:22 +01:00
committed by GitHub
parent df58f4102e
commit 867422627c
114 changed files with 1189 additions and 3524 deletions
@@ -32,9 +32,9 @@ describe('computeSchemaComponents', () => {
"lastName": "Osinski",
},
"fieldLinks": {
"additionalLinks": [],
"primaryLinkLabel": "",
"primaryLinkUrl": "https://narrow-help.net/",
"secondaryLinks": [],
},
"fieldMultiSelect": [
"OPTION_1",
@@ -46,7 +46,9 @@ describe('computeSchemaComponents', () => {
"primaryPhoneCountryCode": "FR",
"primaryPhoneNumber": "06 10 20 30 40",
},
"fieldSelect": "OPTION_1",
"fieldSelect": [
"OPTION_1",
],
},
"properties": {
"fieldActor": {
@@ -533,9 +535,9 @@ describe('computeSchemaComponents', () => {
"lastName": "Jones",
},
"fieldLinks": {
"additionalLinks": [],
"primaryLinkLabel": "",
"primaryLinkUrl": "https://unlawful-blowgun.biz",
"secondaryLinks": [],
},
"fieldMultiSelect": [
"OPTION_1",
@@ -547,7 +549,9 @@ describe('computeSchemaComponents', () => {
"primaryPhoneCountryCode": "FR",
"primaryPhoneNumber": "06 10 20 30 40",
},
"fieldSelect": "OPTION_1",
"fieldSelect": [
"OPTION_1",
],
},
"properties": {
"fieldActor": {
@@ -58,7 +58,7 @@ export const generateRandomFieldValue = ({
return {
primaryLinkLabel: '',
primaryLinkUrl: faker.internet.url(),
secondaryLinks: [],
additionalLinks: [],
};
}
@@ -82,10 +82,10 @@ export const generateRandomFieldValue = ({
case FieldMetadataType.SELECT: {
if (!isDefined(field.options) || !isDefined(field.options[0].value)) {
return null;
return [];
}
return field.options[0].value;
return [field.options[0].value];
}
case FieldMetadataType.MULTI_SELECT: {