diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index cd98f1bd97..ec04fd37ea 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -3198,6 +3198,13 @@ class BaseModelSqlv2 { try { if (raw) await this.model.getColumns(); + // validate update data + if (!raw) { + for (const d of datas) { + await this.validate(d); + } + } + const updateDatas = raw ? datas : await Promise.all( @@ -3211,7 +3218,6 @@ class BaseModelSqlv2 { const updatePkValues = []; const toBeUpdated = []; for (const d of updateDatas) { - if (!raw) await this.validate(d); const pkValues = await this._extractPksValues(d); if (!pkValues) { // throw or skip if no pk provided