From aefedce568168d116e9046b12278cfca1a4f69fa Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 4 Jun 2024 11:35:09 +0200 Subject: [PATCH] Renames --- packages/server/src/api/routes/tests/viewV2.spec.ts | 6 ++++-- packages/server/src/api/routes/utils/validators.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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}.`, }) } }