@@ -229,11 +229,6 @@ public function create(?int $tableId, ?int $viewId, RowDataInput|array $data): R
229229 $ columnsById [$ column ->getId ()] = $ column ;
230230 }
231231
232- foreach ($ data as $ entry ) {
233- $ column = $ columnsById [$ entry ['columnId ' ]];
234- $ this ->validateColumnValueLimits ($ column , $ entry ['value ' ]);
235- }
236-
237232 $ tableId = $ tableId ?? $ view ->getTableId ();
238233
239234 $ data = $ data instanceof RowDataInput ? $ data : RowDataInput::fromArray ($ data );
@@ -353,6 +348,7 @@ private function cleanupAndValidateData(RowDataInput $data, array $columns, ?int
353348 $ column = $ this ->getColumnFromColumnsArray ($ columnId , $ columns );
354349
355350 if ($ column ) {
351+ $ this ->validateColumnValueLimits ($ column , $ entry ['value ' ]);
356352 $ columnBusiness = $ this ->columnsHelper ->getColumnBusinessObject ($ column );
357353 $ columnBusiness ->validateValue ($ entry ['value ' ], $ column , $ this ->userId , $ tableId , $ rowId );
358354 }
@@ -646,7 +642,6 @@ public function updateSet(
646642 // Check whether the column of which the value should change is part of the table / view
647643 $ column = $ this ->getColumnFromColumnsArray ($ entry ['columnId ' ], $ columns );
648644 if ($ column ) {
649- $ this ->validateColumnValueLimits ($ column , $ entry ['value ' ]);
650645 $ item ->insertOrUpdateCell ($ entry );
651646 } else {
652647 $ this ->logger ->warning ('Column to update row not found, will continue and ignore this. ' );
0 commit comments