diff --git a/src/registry/selectboxes/edit-validation.ts b/src/registry/selectboxes/edit-validation.ts index 09d1cca9..5b45e3b1 100644 --- a/src/registry/selectboxes/edit-validation.ts +++ b/src/registry/selectboxes/edit-validation.ts @@ -10,13 +10,9 @@ import {EditSchema} from '../types'; // object :( // so we mark each aspect as optional so that *when* it is provided, we can run the // validation -const valuesSchema = (intl: IntlShape) => ({ values: optionSchema(intl).array().min(1).optional() }); const buildValuesSchema = (intl: IntlShape) => z.object({ - ...valuesSchema(intl), - // The values list can also appear inside a data object - // So repeat the previous rule - data: z.object(valuesSchema(intl)).optional(), + values: optionSchema(intl).array().min(1).optional(), openForms: z.object({ dataSrc: z.union([z.literal('manual'), z.literal('variable')]), // TODO: wire up infernologic type checking