@univerjssheets-data-validationindexclassesCheckboxvalidator

@univerjs/sheets-data-validation v0.5.4


Class: CheckboxValidator

Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:51

Extends

Constructors

new CheckboxValidator()

new CheckboxValidator(localeService, injector): CheckboxValidator

Defined in: data-validation/src/validators/base-data-validator.ts:79

Parameters

ParameterType
localeServiceLocaleService
injectorInjector

Returns

CheckboxValidator

Inherited from

BaseDataValidator.constructor

Properties

PropertyModifierTypeDefault valueOverridesInherited fromDefined in
canvasRenderpublicNullable<IBaseDataValidationWidget>null-BaseDataValidator.canvasRenderdata-validation/src/validators/base-data-validator.ts:73
dropdownpublicundefined | stringundefined-BaseDataValidator.dropdowndata-validation/src/validators/base-data-validator.ts:74
formulaInputpublicundefined | stringundefined-BaseDataValidator.formulaInputdata-validation/src/validators/base-data-validator.ts:72
idpublicstringDataValidationType.CHECKBOXBaseDataValidator.id-sheets-data-validation/src/validators/checkbox-validator.ts:52
injectorreadonlyInjectorundefined-BaseDataValidator.injectordata-validation/src/validators/base-data-validator.ts:81
localeServicereadonlyLocaleServiceundefined-BaseDataValidator.localeServicedata-validation/src/validators/base-data-validator.ts:80
offsetFormulaByRangereadonlyfalsefalseBaseDataValidator.offsetFormulaByRange-sheets-data-validation/src/validators/checkbox-validator.ts:57
operatorspublicDataValidationOperator[][]BaseDataValidator.operators-sheets-data-validation/src/validators/checkbox-validator.ts:54
optionsInputpublicundefined | stringundefined-BaseDataValidator.optionsInputdata-validation/src/validators/base-data-validator.ts:75
scopespublicstring | string[]undefinedBaseDataValidator.scopes-sheets-data-validation/src/validators/checkbox-validator.ts:55
titlepublicstring'dataValidation.checkbox.title'BaseDataValidator.title-sheets-data-validation/src/validators/checkbox-validator.ts:53

Accessors

operatorNames

Get Signature

get operatorNames(): string[]

Defined in: data-validation/src/validators/base-data-validator.ts:86

Returns

string[]

Inherited from

BaseDataValidator.operatorNames


titleStr

Get Signature

get titleStr(): string

Defined in: data-validation/src/validators/base-data-validator.ts:90

Returns

string

Inherited from

BaseDataValidator.titleStr

Methods

generateRuleErrorMessage()

generateRuleErrorMessage(rule): string

Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:153

Parameters

ParameterType
ruleIDataValidationRuleBase

Returns

string

Overrides

BaseDataValidator.generateRuleErrorMessage


generateRuleName()

generateRuleName(rule): string

Defined in: data-validation/src/validators/base-data-validator.ts:96

Parameters

ParameterType
ruleIDataValidationRuleBase

Returns

string

Inherited from

BaseDataValidator.generateRuleName


getExtraStyle()

getExtraStyle(rule, value): {
  tb: WrapStrategy;
}

Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:116

Parameters

ParameterType
ruleIDataValidationRule
valueNullable<CellValue>

Returns

{
  tb: WrapStrategy;
}
NameTypeDefault valueDefined in
tbWrapStrategyWrapStrategy.CLIPsheets-data-validation/src/validators/checkbox-validator.ts:118

Overrides

BaseDataValidator.getExtraStyle


getRuleFinalError()

getRuleFinalError(rule, position): string

Defined in: data-validation/src/validators/base-data-validator.ts:116

Parameters

ParameterType
ruleIDataValidationRule
positionISheetLocationBase

Returns

string

Inherited from

BaseDataValidator.getRuleFinalError


isEmptyCellValue()

isEmptyCellValue(cellValue): cellValue is undefined | null | void

Defined in: data-validation/src/validators/base-data-validator.ts:124

Parameters

ParameterType
cellValueNullable<CellValue>

Returns

cellValue is undefined | null | void

Inherited from

BaseDataValidator.isEmptyCellValue


isValidType()

isValidType(
   cellInfo, 
   formula, 
rule): Promise<boolean>

Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:138

Parameters

ParameterType
cellInfoIValidatorCellInfo<CellValue>
formulaIFormulaResult
ruleIDataValidationRule

Returns

Promise<boolean>

Overrides

BaseDataValidator.isValidType


normalizeFormula()

normalizeFormula(
   rule, 
   unitId, 
   subUnitId): {
  formula1: undefined | string;
  formula2: undefined | string;
}

Defined in: data-validation/src/validators/base-data-validator.ts:136

Parameters

ParameterType
ruleIDataValidationRule
unitIdstring
subUnitIdstring

Returns

{
  formula1: undefined | string;
  formula2: undefined | string;
}
NameTypeDefault valueDefined in
formula1undefined | stringrule.formula1data-validation/src/validators/base-data-validator.ts:138
formula2undefined | stringrule.formula2data-validation/src/validators/base-data-validator.ts:139

Inherited from

BaseDataValidator.normalizeFormula


parseFormula()

parseFormula(
   rule, 
   unitId, 
subUnitId): Promise<ICheckboxFormulaResult>

Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:99

Parameters

ParameterType
ruleIDataValidationRule
unitIdstring
subUnitIdstring

Returns

Promise<ICheckboxFormulaResult>

Overrides

BaseDataValidator.parseFormula


parseFormulaSync()

parseFormulaSync(
   rule, 
   unitId, 
   subUnitId): ICheckboxFormulaResult

Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:122

Parameters

ParameterType
ruleIDataValidationRule
unitIdstring
subUnitIdstring

Returns

ICheckboxFormulaResult


skipDefaultFontRender()

skipDefaultFontRender(
   rule, 
   cellValue, 
   pos): boolean

Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:61

Parameters

ParameterType
ruleISheetDataValidationRule
cellValueNullable<CellValue>
pos{ column: number; row: number; subUnitId: string; unitId: string; }
pos.columnnumber
pos.rownumber
pos.subUnitIdstring
pos.unitIdstring

Returns

boolean

Overrides

BaseDataValidator.skipDefaultFontRender

transform()

transform(
   cellInfo, 
   formula, 
rule): IValidatorCellInfo<number>

Defined in: data-validation/src/validators/base-data-validator.ts:147

Parameters

ParameterType
cellInfoIValidatorCellInfo
formulaIFormulaResult
ruleIDataValidationRule

Returns

IValidatorCellInfo<number>

Inherited from

BaseDataValidator.transform


validator()

validator(cellInfo, rule): Promise<boolean>

Defined in: data-validation/src/validators/base-data-validator.ts:224

Parameters

ParameterType
cellInfoIValidatorCellInfo
ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

BaseDataValidator.validator


validatorFormula()

validatorFormula(
   rule, 
   unitId, 
   subUnitId): IFormulaValidResult

Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:71

Parameters

ParameterType
ruleIDataValidationRule
unitIdstring
subUnitIdstring

Returns

IFormulaValidResult

Overrides

BaseDataValidator.validatorFormula


validatorIsBetween()

validatorIsBetween(
   cellInfo, 
   formula, 
_rule): Promise<boolean>

Defined in: data-validation/src/validators/base-data-validator.ts:170

Parameters

ParameterType
cellInfoIValidatorCellInfo<number>
formulaIFormulaResult
_ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

BaseDataValidator.validatorIsBetween


validatorIsEqual()

validatorIsEqual(
   cellInfo, 
   formula, 
rule): Promise<boolean>

Defined in: data-validation/src/validators/base-data-validator.ts:151

Parameters

ParameterType
cellInfoIValidatorCellInfo<CellValue>
formulaIFormulaResult
ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

BaseDataValidator.validatorIsEqual


validatorIsGreaterThan()

validatorIsGreaterThan(
   cellInfo, 
   formula, 
_rule): Promise<boolean>

Defined in: data-validation/src/validators/base-data-validator.ts:191

Parameters

ParameterType
cellInfoIValidatorCellInfo<number>
formulaIFormulaResult
_ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

BaseDataValidator.validatorIsGreaterThan


validatorIsGreaterThanOrEqual()

validatorIsGreaterThanOrEqual(
   cellInfo, 
   formula, 
_rule): Promise<boolean>

Defined in: data-validation/src/validators/base-data-validator.ts:199

Parameters

ParameterType
cellInfoIValidatorCellInfo<number>
formulaIFormulaResult
_ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

BaseDataValidator.validatorIsGreaterThanOrEqual


validatorIsLessThan()

validatorIsLessThan(
   cellInfo, 
   formula, 
_rule): Promise<boolean>

Defined in: data-validation/src/validators/base-data-validator.ts:207

Parameters

ParameterType
cellInfoIValidatorCellInfo<number>
formulaIFormulaResult
_ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

BaseDataValidator.validatorIsLessThan


validatorIsLessThanOrEqual()

validatorIsLessThanOrEqual(
   cellInfo, 
   formula, 
_rule): Promise<boolean>

Defined in: data-validation/src/validators/base-data-validator.ts:215

Parameters

ParameterType
cellInfoIValidatorCellInfo<number>
formulaIFormulaResult
_ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

BaseDataValidator.validatorIsLessThanOrEqual


validatorIsNotBetween()

validatorIsNotBetween(
   cellInfo, 
   formula, 
_rule): Promise<boolean>

Defined in: data-validation/src/validators/base-data-validator.ts:181

Parameters

ParameterType
cellInfoIValidatorCellInfo<number>
formulaIFormulaResult
_ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

BaseDataValidator.validatorIsNotBetween


validatorIsNotEqual()

validatorIsNotEqual(
   cellInfo, 
   formula, 
_rule): Promise<boolean>

Defined in: data-validation/src/validators/base-data-validator.ts:161

Parameters

ParameterType
cellInfoIValidatorCellInfo<number>
formulaIFormulaResult
_ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

BaseDataValidator.validatorIsNotEqual