DataValidator
in package
Validate a cell value according to its validation rules.
Table of Contents
Constants
- TWO_FORMULAS = [\PhpOffice\PhpSpreadsheet\Cell\DataValidation::OPERATOR_BETWEEN, \PhpOffice\PhpSpreadsheet\Cell\DataValidation::OPERATOR_NOTBETWEEN]
Methods
- isValid() : bool
- Does this cell contain valid value?
- evaluateNumericFormula() : mixed
- isValueInList() : bool
- Does this cell contain valid value, based on list?
- numericOperator() : bool
Constants
TWO_FORMULAS
private
mixed
TWO_FORMULAS
= [\PhpOffice\PhpSpreadsheet\Cell\DataValidation::OPERATOR_BETWEEN, \PhpOffice\PhpSpreadsheet\Cell\DataValidation::OPERATOR_NOTBETWEEN]
Methods
isValid()
Does this cell contain valid value?
public
isValid(Cell $cell) : bool
Parameters
- $cell : Cell
-
Cell to check the value
Return values
boolevaluateNumericFormula()
private
static evaluateNumericFormula(mixed $formula, Cell $cell) : mixed
Parameters
- $formula : mixed
- $cell : Cell
isValueInList()
Does this cell contain valid value, based on list?
private
isValueInList(Cell $cell) : bool
Parameters
- $cell : Cell
-
Cell to check the value
Return values
boolnumericOperator()
private
numericOperator(DataValidation $dataValidation, int|float $cellValue, Cell $cell) : bool
Parameters
- $dataValidation : DataValidation
- $cellValue : int|float
- $cell : Cell