Skip to content

Commit

Permalink
Fix an error when trying to validate column values
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Aug 14, 2024
1 parent b32e650 commit 139c95e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/fields/TableMakerField.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ public function validateTableData(ElementInterface $element): void
$row[$colId] = trim($row[$colId]);
}

if (!$this->_validateCellValue($col['type'], $row[$colId], $error)) {
$type = $col['type'] ?? null;

if ($type && !$this->_validateCellValue($type, $row[$colId], $error)) {
$element->addError($this->handle, $error);
}
}
Expand Down

0 comments on commit 139c95e

Please sign in to comment.