diff --git a/packages/server/src/api/routes/tests/viewV2.spec.ts b/packages/server/src/api/routes/tests/viewV2.spec.ts index 3376cb86fa..cf9db761ce 100644 --- a/packages/server/src/api/routes/tests/viewV2.spec.ts +++ b/packages/server/src/api/routes/tests/viewV2.spec.ts @@ -1424,7 +1424,8 @@ describe.each([ status: 400, body: { status: 400, - message: 'Required field "name" is missing in view "view a"', + message: + 'To make field "name" required, this field must be present and writable in views: view a.', }, } ) @@ -1454,7 +1455,8 @@ describe.each([ status: 400, body: { status: 400, - message: 'Required field "name" is missing in view "view a"', + message: + 'To make field "name" required, this field must be present and writable in views: view a.', }, } ) diff --git a/packages/server/src/api/routes/utils/validators.ts b/packages/server/src/api/routes/utils/validators.ts index 9a726dc757..e2cc463f38 100644 --- a/packages/server/src/api/routes/utils/validators.ts +++ b/packages/server/src/api/routes/utils/validators.ts @@ -30,7 +30,7 @@ const validateViewSchemas: CustomValidator = (table, helpers) => { ) if (missingField) { return helpers.message({ - custom: `Required field "${missingField}" is missing in view "${view.name}"`, + custom: `To make field "${missingField}" required, this field must be present and writable in views: ${view.name}.`, }) } }