30 if (!$dataValidation->getAllowBlank() && ($cellValue ===
null || $cellValue ===
'')) {
35 switch ($dataValidation->getType()) {
55 $formula1 = $dataValidation->getFormula1();
56 if (!empty($formula1)) {
58 if ($formula1[0] ===
'"') {
59 return in_array(strtolower($cellValue), explode(
',', strtolower(trim($formula1,
'"'))),
true);
60 } elseif (strpos($formula1,
':') > 0) {
62 $matchFormula =
'=MATCH(' . $cell->
getCoordinate() .
', ' . $formula1 .
', 0)';
An exception for terminatinating execution or to throw for unit testing.
static getInstance(?Spreadsheet $spreadsheet=null)
Get an instance of this class.
getDataValidation()
Get Data validation rules.
getWorksheet()
Get parent worksheet.
hasDataValidation()
Does this cell contain Data validation rules?
getCoordinate()
Get cell coordinate.
getValue()
Get cell value.
Validate a cell value according to its validation rules.
isValueInList(Cell $cell)
Does this cell contain valid value, based on list?
isValid(Cell $cell)
Does this cell contain valid value?