diff --git a/package-lock.json b/package-lock.json index ca9866e01a5..aafe1c333bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -64987,7 +64987,7 @@ }, "packages/common": { "name": "@esri/hub-common", - "version": "14.39.0", + "version": "14.42.1", "license": "Apache-2.0", "dependencies": { "abab": "^2.0.5", diff --git a/packages/common/src/content/_internal/ContentUiSchemaEdit.ts b/packages/common/src/content/_internal/ContentUiSchemaEdit.ts index cbe42476a9f..43a9c27958b 100644 --- a/packages/common/src/content/_internal/ContentUiSchemaEdit.ts +++ b/packages/common/src/content/_internal/ContentUiSchemaEdit.ts @@ -41,6 +41,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.title.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -56,6 +62,14 @@ export const buildUiSchema = async ( helperText: { labelKey: `${i18nScope}.fields.summary.hint`, }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, // description diff --git a/packages/common/src/discussions/_internal/DiscussionUiSchemaCreate.ts b/packages/common/src/discussions/_internal/DiscussionUiSchemaCreate.ts index 45b4f59ee4a..3a6296f4bee 100644 --- a/packages/common/src/discussions/_internal/DiscussionUiSchemaCreate.ts +++ b/packages/common/src/discussions/_internal/DiscussionUiSchemaCreate.ts @@ -27,6 +27,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, diff --git a/packages/common/src/discussions/_internal/DiscussionUiSchemaEdit.ts b/packages/common/src/discussions/_internal/DiscussionUiSchemaEdit.ts index cb227d2095e..d7a8d7defac 100644 --- a/packages/common/src/discussions/_internal/DiscussionUiSchemaEdit.ts +++ b/packages/common/src/discussions/_internal/DiscussionUiSchemaEdit.ts @@ -38,6 +38,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -70,6 +76,14 @@ export const buildUiSchema = async ( helperText: { labelKey: `${i18nScope}.fields.summary.helperText`, }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/src/groups/_internal/GroupUiSchemaEdit.ts b/packages/common/src/groups/_internal/GroupUiSchemaEdit.ts index 81b3857c31d..a6104cf9ea3 100644 --- a/packages/common/src/groups/_internal/GroupUiSchemaEdit.ts +++ b/packages/common/src/groups/_internal/GroupUiSchemaEdit.ts @@ -32,6 +32,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -43,6 +49,14 @@ export const buildUiSchema = async ( control: "hub-field-input-input", type: "textarea", rows: 4, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/src/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.ts b/packages/common/src/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.ts index f57e266ed57..28bef70a964 100644 --- a/packages/common/src/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.ts +++ b/packages/common/src/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.ts @@ -39,6 +39,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -76,6 +82,14 @@ export const buildUiSchema = async ( helperText: { labelKey: `${i18nScope}.fields.summary.helperText`, }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/src/initiatives/_internal/InitiativeUiSchemaCreate.ts b/packages/common/src/initiatives/_internal/InitiativeUiSchemaCreate.ts index d5c42a6ae2c..dccfeb60290 100644 --- a/packages/common/src/initiatives/_internal/InitiativeUiSchemaCreate.ts +++ b/packages/common/src/initiatives/_internal/InitiativeUiSchemaCreate.ts @@ -47,6 +47,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -61,6 +67,14 @@ export const buildUiSchema = async ( helperText: { labelKey: `${i18nScope}.fields.summary.helperText`, }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, ], diff --git a/packages/common/src/initiatives/_internal/InitiativeUiSchemaEdit.ts b/packages/common/src/initiatives/_internal/InitiativeUiSchemaEdit.ts index 85872496531..704d57ef5d9 100644 --- a/packages/common/src/initiatives/_internal/InitiativeUiSchemaEdit.ts +++ b/packages/common/src/initiatives/_internal/InitiativeUiSchemaEdit.ts @@ -38,6 +38,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -52,6 +58,14 @@ export const buildUiSchema = async ( helperText: { labelKey: `${i18nScope}.fields.summary.helperText`, }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/src/pages/_internal/PageUiSchemaEdit.ts b/packages/common/src/pages/_internal/PageUiSchemaEdit.ts index 46bac792502..d12915a4f07 100644 --- a/packages/common/src/pages/_internal/PageUiSchemaEdit.ts +++ b/packages/common/src/pages/_internal/PageUiSchemaEdit.ts @@ -37,6 +37,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -51,6 +57,14 @@ export const buildUiSchema = async ( helperText: { labelKey: `${i18nScope}.fields.summary.helperText`, }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/src/projects/_internal/ProjectUiSchemaCreate.ts b/packages/common/src/projects/_internal/ProjectUiSchemaCreate.ts index 2924f8001b8..046fe7a6e72 100644 --- a/packages/common/src/projects/_internal/ProjectUiSchemaCreate.ts +++ b/packages/common/src/projects/_internal/ProjectUiSchemaCreate.ts @@ -44,6 +44,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -58,6 +64,14 @@ export const buildUiSchema = async ( helperText: { labelKey: `${i18nScope}.fields.summary.helperText`, }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/src/projects/_internal/ProjectUiSchemaEdit.ts b/packages/common/src/projects/_internal/ProjectUiSchemaEdit.ts index dfecb8b88bf..4bcbb882782 100644 --- a/packages/common/src/projects/_internal/ProjectUiSchemaEdit.ts +++ b/packages/common/src/projects/_internal/ProjectUiSchemaEdit.ts @@ -39,6 +39,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -53,6 +59,14 @@ export const buildUiSchema = async ( helperText: { labelKey: `${i18nScope}.fields.summary.helperText`, }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/src/sites/_internal/SiteUiSchemaCreate.ts b/packages/common/src/sites/_internal/SiteUiSchemaCreate.ts index c1149bc82e0..d587ec7bac6 100644 --- a/packages/common/src/sites/_internal/SiteUiSchemaCreate.ts +++ b/packages/common/src/sites/_internal/SiteUiSchemaCreate.ts @@ -47,6 +47,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -61,6 +67,14 @@ export const buildUiSchema = async ( helperText: { labelKey: `${i18nScope}.fields.summary.helperText`, }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, ], diff --git a/packages/common/src/sites/_internal/SiteUiSchemaEdit.ts b/packages/common/src/sites/_internal/SiteUiSchemaEdit.ts index 741ad9d2b66..afa399c1b63 100644 --- a/packages/common/src/sites/_internal/SiteUiSchemaEdit.ts +++ b/packages/common/src/sites/_internal/SiteUiSchemaEdit.ts @@ -37,6 +37,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -51,6 +57,14 @@ export const buildUiSchema = async ( helperText: { labelKey: `${i18nScope}.fields.summary.helperText`, }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/src/templates/_internal/TemplateUiSchemaEdit.ts b/packages/common/src/templates/_internal/TemplateUiSchemaEdit.ts index e17d95c7d2d..bb12598537a 100644 --- a/packages/common/src/templates/_internal/TemplateUiSchemaEdit.ts +++ b/packages/common/src/templates/_internal/TemplateUiSchemaEdit.ts @@ -38,6 +38,12 @@ export const buildUiSchema = async ( icon: true, labelKey: `${i18nScope}.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -75,6 +81,14 @@ export const buildUiSchema = async ( helperText: { labelKey: `${i18nScope}.fields.summary.helperText`, }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/test/content/_internal/ContentUiSchemaEdit.test.ts b/packages/common/test/content/_internal/ContentUiSchemaEdit.test.ts index fc9e2e63ff5..5a65f77f33b 100644 --- a/packages/common/test/content/_internal/ContentUiSchemaEdit.test.ts +++ b/packages/common/test/content/_internal/ContentUiSchemaEdit.test.ts @@ -50,6 +50,12 @@ describe("buildUiSchema: content edit", () => { icon: true, labelKey: "some.scope.fields.title.requiredError", }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -64,6 +70,14 @@ describe("buildUiSchema: content edit", () => { helperText: { labelKey: "some.scope.fields.summary.hint", }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/test/discussions/_internal/DiscussionUiSchemaCreate.test.ts b/packages/common/test/discussions/_internal/DiscussionUiSchemaCreate.test.ts index 2c249fb086d..e946e5ff740 100644 --- a/packages/common/test/discussions/_internal/DiscussionUiSchemaCreate.test.ts +++ b/packages/common/test/discussions/_internal/DiscussionUiSchemaCreate.test.ts @@ -19,6 +19,12 @@ describe("buildUiSchema: discussion create", () => { icon: true, labelKey: "some.scope.fields.name.requiredError", }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, diff --git a/packages/common/test/discussions/_internal/DiscussionUiSchemaEdit.test.ts b/packages/common/test/discussions/_internal/DiscussionUiSchemaEdit.test.ts index 5a9dd0d2276..6b5c588f18e 100644 --- a/packages/common/test/discussions/_internal/DiscussionUiSchemaEdit.test.ts +++ b/packages/common/test/discussions/_internal/DiscussionUiSchemaEdit.test.ts @@ -51,6 +51,12 @@ describe("buildUiSchema: discussion edit", () => { icon: true, labelKey: "some.scope.fields.name.requiredError", }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -83,6 +89,14 @@ describe("buildUiSchema: discussion edit", () => { helperText: { labelKey: "some.scope.fields.summary.helperText", }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/test/groups/_internal/GroupUiSchemaEdit.test.ts b/packages/common/test/groups/_internal/GroupUiSchemaEdit.test.ts index ec14f040e59..9de41e1a8a2 100644 --- a/packages/common/test/groups/_internal/GroupUiSchemaEdit.test.ts +++ b/packages/common/test/groups/_internal/GroupUiSchemaEdit.test.ts @@ -27,6 +27,12 @@ describe("buildUiSchema: group edit", () => { icon: true, labelKey: "some.scope.fields.name.requiredError", }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -38,6 +44,14 @@ describe("buildUiSchema: group edit", () => { control: "hub-field-input-input", type: "textarea", rows: 4, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/test/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.test.ts b/packages/common/test/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.test.ts index 13b31ce708a..4cd783c5ae3 100644 --- a/packages/common/test/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.test.ts +++ b/packages/common/test/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.test.ts @@ -36,6 +36,12 @@ describe("buildUiSchema: initiative template edit", () => { icon: true, labelKey: `some.scope.fields.name.requiredError`, }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -73,6 +79,14 @@ describe("buildUiSchema: initiative template edit", () => { helperText: { labelKey: "some.scope.fields.summary.helperText", }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/test/initiatives/_internal/InitiativeUiSchemaCreate.test.ts b/packages/common/test/initiatives/_internal/InitiativeUiSchemaCreate.test.ts index 6c08cd970cf..d31f8378b2b 100644 --- a/packages/common/test/initiatives/_internal/InitiativeUiSchemaCreate.test.ts +++ b/packages/common/test/initiatives/_internal/InitiativeUiSchemaCreate.test.ts @@ -48,6 +48,12 @@ describe("buildUiSchema: initiative create", () => { icon: true, labelKey: "some.scope.fields.name.requiredError", }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -62,6 +68,14 @@ describe("buildUiSchema: initiative create", () => { helperText: { labelKey: "some.scope.fields.summary.helperText", }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, ], diff --git a/packages/common/test/initiatives/_internal/InitiativeUiSchemaEdit.test.ts b/packages/common/test/initiatives/_internal/InitiativeUiSchemaEdit.test.ts index ea6b8c8d3f3..e5b2f39d5d4 100644 --- a/packages/common/test/initiatives/_internal/InitiativeUiSchemaEdit.test.ts +++ b/packages/common/test/initiatives/_internal/InitiativeUiSchemaEdit.test.ts @@ -52,6 +52,12 @@ describe("buildUiSchema: initiative edit", () => { icon: true, labelKey: "some.scope.fields.name.requiredError", }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -66,6 +72,14 @@ describe("buildUiSchema: initiative edit", () => { helperText: { labelKey: "some.scope.fields.summary.helperText", }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/test/pages/_internal/PageUiSchemaEdit.test.ts b/packages/common/test/pages/_internal/PageUiSchemaEdit.test.ts index 847f47b19a8..247a0dac772 100644 --- a/packages/common/test/pages/_internal/PageUiSchemaEdit.test.ts +++ b/packages/common/test/pages/_internal/PageUiSchemaEdit.test.ts @@ -47,6 +47,12 @@ describe("buildUiSchema: page edit", () => { icon: true, labelKey: "some.scope.fields.name.requiredError", }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -61,6 +67,14 @@ describe("buildUiSchema: page edit", () => { helperText: { labelKey: "some.scope.fields.summary.helperText", }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/test/projects/_internal/ProjectUiSchemaCreate.test.ts b/packages/common/test/projects/_internal/ProjectUiSchemaCreate.test.ts index c73841b784f..126e17f6ba6 100644 --- a/packages/common/test/projects/_internal/ProjectUiSchemaCreate.test.ts +++ b/packages/common/test/projects/_internal/ProjectUiSchemaCreate.test.ts @@ -48,6 +48,12 @@ describe("buildUiSchema: project create", () => { icon: true, labelKey: "some.scope.fields.name.requiredError", }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -62,6 +68,14 @@ describe("buildUiSchema: project create", () => { helperText: { labelKey: "some.scope.fields.summary.helperText", }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/test/projects/_internal/ProjectUiSchemaEdit.test.ts b/packages/common/test/projects/_internal/ProjectUiSchemaEdit.test.ts index 32f68ab2b20..1b0979d50c5 100644 --- a/packages/common/test/projects/_internal/ProjectUiSchemaEdit.test.ts +++ b/packages/common/test/projects/_internal/ProjectUiSchemaEdit.test.ts @@ -56,6 +56,12 @@ describe("buildUiSchema: project edit", () => { icon: true, labelKey: "some.scope.fields.name.requiredError", }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -70,6 +76,14 @@ describe("buildUiSchema: project edit", () => { helperText: { labelKey: "some.scope.fields.summary.helperText", }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/test/sites/_internal/SiteUiSchemaCreate.test.ts b/packages/common/test/sites/_internal/SiteUiSchemaCreate.test.ts index 3d0e764fd78..954d16f3ea0 100644 --- a/packages/common/test/sites/_internal/SiteUiSchemaCreate.test.ts +++ b/packages/common/test/sites/_internal/SiteUiSchemaCreate.test.ts @@ -48,6 +48,12 @@ describe("buildUiSchema: site create", () => { icon: true, labelKey: "some.scope.fields.name.requiredError", }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -62,6 +68,14 @@ describe("buildUiSchema: site create", () => { helperText: { labelKey: "some.scope.fields.summary.helperText", }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, ], diff --git a/packages/common/test/sites/_internal/SiteUiSchemaEdit.test.ts b/packages/common/test/sites/_internal/SiteUiSchemaEdit.test.ts index 7816e1e218d..581275d8c34 100644 --- a/packages/common/test/sites/_internal/SiteUiSchemaEdit.test.ts +++ b/packages/common/test/sites/_internal/SiteUiSchemaEdit.test.ts @@ -47,6 +47,12 @@ describe("buildUiSchema: site edit", () => { icon: true, labelKey: "some.scope.fields.name.requiredError", }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -61,6 +67,14 @@ describe("buildUiSchema: site edit", () => { helperText: { labelKey: "some.scope.fields.summary.helperText", }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, { diff --git a/packages/common/test/templates/_internal/TemplateUiSchemaEdit.test.ts b/packages/common/test/templates/_internal/TemplateUiSchemaEdit.test.ts index 80c89af39c3..95fe90f2b42 100644 --- a/packages/common/test/templates/_internal/TemplateUiSchemaEdit.test.ts +++ b/packages/common/test/templates/_internal/TemplateUiSchemaEdit.test.ts @@ -30,6 +30,12 @@ describe("buildUiSchema: template edit", () => { icon: true, labelKey: "some.scope.fields.name.requiredError", }, + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.name.maxLengthError`, + }, ], }, }, @@ -67,6 +73,14 @@ describe("buildUiSchema: template edit", () => { helperText: { labelKey: "some.scope.fields.summary.helperText", }, + messages: [ + { + type: "ERROR", + keyword: "maxLength", + icon: true, + labelKey: `shared.fields.summary.maxLengthError`, + }, + ], }, }, {