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)';
getCoordinate()
Get cell coordinate.
Validate a cell value according to its validation rules.
getValue()
Get cell value.
hasDataValidation()
Does this cell contain Data validation rules?
isValid(Cell $cell)
Does this cell contain valid value?
static getInstance(?Spreadsheet $spreadsheet=null)
Get an instance of this class.
isValueInList(Cell $cell)
Does this cell contain valid value, based on list?
getDataValidation()
Get Data validation rules.
getWorksheet()
Get parent worksheet.