API Reference
@univerjs
@univerjs/sheets-data-validation
classes
Listmultiplevalidator

@univerjs/sheets-data-validation v0.4.2Docs


Class: ListMultipleValidator

Extends

Constructors

new ListMultipleValidator()

new ListMultipleValidator(localeService, injector): ListMultipleValidator

Parameters

ParameterType
localeServiceLocaleService
injectorInjector

Returns

ListMultipleValidator

Inherited from

ListValidator.constructor

Defined in

data-validation/src/validators/base-data-validator.ts:76 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueOverridesInherited fromDefined in
canvasRenderpublicNullable<IBaseDataValidationWidget>null-ListValidator.canvasRenderdata-validation/src/validators/base-data-validator.ts:70 (opens in a new tab)
dropdownpublicundefined | stringundefined-ListValidator.dropdowndata-validation/src/validators/base-data-validator.ts:71 (opens in a new tab)
formulaInputpublicundefined | stringundefined-ListValidator.formulaInputdata-validation/src/validators/base-data-validator.ts:69 (opens in a new tab)
formulaServiceprotectedDataValidationFormulaServiceundefined-ListValidator.formulaServicesheets-data-validation/src/validators/list-validator.ts:92 (opens in a new tab)
idpublicstringDataValidationType.LIST_MULTIPLEListValidator.id-sheets-data-validation/src/validators/list-multiple-validator.ts:21 (opens in a new tab)
injectorreadonlyInjectorundefined-ListValidator.injectordata-validation/src/validators/base-data-validator.ts:78 (opens in a new tab)
localeServicereadonlyLocaleServiceundefined-ListValidator.localeServicedata-validation/src/validators/base-data-validator.ts:77 (opens in a new tab)
operatorspublicDataValidationOperator[][]-ListValidator.operatorssheets-data-validation/src/validators/list-validator.ts:98 (opens in a new tab)
optionsInputpublicundefined | stringundefined-ListValidator.optionsInputdata-validation/src/validators/base-data-validator.ts:72 (opens in a new tab)
scopespublicstring | string[]undefined-ListValidator.scopessheets-data-validation/src/validators/list-validator.ts:99 (opens in a new tab)
titlepublicstring'dataValidation.listMultiple.title'ListValidator.title-sheets-data-validation/src/validators/list-multiple-validator.ts:22 (opens in a new tab)

Accessors

operatorNames

get operatorNames(): string[]

Returns

string[]

Inherited from

ListValidator.operatorNames

Defined in

data-validation/src/validators/base-data-validator.ts:83 (opens in a new tab)


titleStr

get titleStr(): string

Returns

string

Inherited from

ListValidator.titleStr

Defined in

data-validation/src/validators/base-data-validator.ts:87 (opens in a new tab)

Methods

generateRuleErrorMessage()

generateRuleErrorMessage(): string

Returns

string

Inherited from

ListValidator.generateRuleErrorMessage

Defined in

sheets-data-validation/src/validators/list-validator.ts:173 (opens in a new tab)


generateRuleName()

generateRuleName(): string

Returns

string

Inherited from

ListValidator.generateRuleName

Defined in

sheets-data-validation/src/validators/list-validator.ts:169 (opens in a new tab)


getExtraStyle()

getExtraStyle(
   rule, 
   value, 
__namedParameters): Nullable<IStyleData>

Parameters

ParameterType
ruleIDataValidationRule
valueNullable<CellValue>
__namedParametersobject
__namedParameters.styleIStyleData

Returns

Nullable<IStyleData>

Inherited from

ListValidator.getExtraStyle

Defined in

sheets-data-validation/src/validators/list-validator.ts:123 (opens in a new tab)


getList()

getList(
   rule, 
   currentUnitId?, 
   currentSubUnitId?): string[]

Parameters

ParameterType
ruleIDataValidationRule
currentUnitId?string
currentSubUnitId?string

Returns

string[]

Inherited from

ListValidator.getList

Defined in

sheets-data-validation/src/validators/list-validator.ts:177 (opens in a new tab)


getListAsync()

getListAsync(
   rule, 
   currentUnitId?, 
currentSubUnitId?): Promise<string[]>

Parameters

ParameterType
ruleIDataValidationRule
currentUnitId?string
currentSubUnitId?string

Returns

Promise<string[]>

Inherited from

ListValidator.getListAsync

Defined in

sheets-data-validation/src/validators/list-validator.ts:192 (opens in a new tab)


getListWithColor()

getListWithColor(
   rule, 
   currentUnitId?, 
   currentSubUnitId?): {
  color: string;
  label: string;
 }[]

Parameters

ParameterType
ruleIDataValidationRule
currentUnitId?string
currentSubUnitId?string

Returns

{ color: string; label: string; }[]

Inherited from

ListValidator.getListWithColor

Defined in

sheets-data-validation/src/validators/list-validator.ts:207 (opens in a new tab)


getListWithColorMap()

getListWithColorMap(
   rule, 
   currentUnitId?, 
currentSubUnitId?): Record<string, string>

Parameters

ParameterType
ruleIDataValidationRule
currentUnitId?string
currentSubUnitId?string

Returns

Record<string, string>

Inherited from

ListValidator.getListWithColorMap

Defined in

sheets-data-validation/src/validators/list-validator.ts:214 (opens in a new tab)


getRuleFinalError()

getRuleFinalError(rule): string

Parameters

ParameterType
ruleIDataValidationRule

Returns

string

Inherited from

ListValidator.getRuleFinalError

Defined in

data-validation/src/validators/base-data-validator.ts:113 (opens in a new tab)


isEmptyCellValue()

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

Parameters

ParameterType
cellValueNullable<CellValue>

Returns

cellValue is undefined | null | void

Inherited from

ListValidator.isEmptyCellValue

Defined in

data-validation/src/validators/base-data-validator.ts:121 (opens in a new tab)


isValidType()

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

Parameters

ParameterType
cellInfoIValidatorCellInfo<Nullable<CellValue>>
formulaIFormulaResult<undefined | string[]>
ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

ListValidator.isValidType

Defined in

sheets-data-validation/src/validators/list-validator.ts:162 (opens in a new tab)


normalizeFormula()

normalizeFormula(
   rule, 
   unitId, 
   subUnitId): {
  formula1: rule.formula1;
  formula2: rule.formula2;
}

Parameters

ParameterType
ruleIDataValidationRule
unitIdstring
subUnitIdstring

Returns

{
  formula1: rule.formula1;
  formula2: rule.formula2;
}
NameTypeDefault valueDefined in
formula1undefined | stringrule.formula1data-validation/src/validators/base-data-validator.ts:135 (opens in a new tab)
formula2undefined | stringrule.formula2data-validation/src/validators/base-data-validator.ts:136 (opens in a new tab)

Inherited from

ListValidator.normalizeFormula

Defined in

data-validation/src/validators/base-data-validator.ts:133 (opens in a new tab)


parseCellValue()

parseCellValue(cellValue): string[]

Parameters

ParameterType
cellValueCellValue

Returns

string[]

Inherited from

ListValidator.parseCellValue

Defined in

sheets-data-validation/src/validators/list-validator.ts:144 (opens in a new tab)


parseFormula()

parseFormula(
   rule, 
   unitId, 
subUnitId): Promise<IFormulaResult<undefined | string[]>>

Parameters

ParameterType
ruleIDataValidationRule
unitIdstring
subUnitIdstring

Returns

Promise<IFormulaResult<undefined | string[]>>

Inherited from

ListValidator.parseFormula

Defined in

sheets-data-validation/src/validators/list-validator.ts:149 (opens in a new tab)


skipDefaultFontRender()

skipDefaultFontRender(): boolean

Returns

boolean

Overrides

ListValidator.skipDefaultFontRender

Defined in

sheets-data-validation/src/validators/list-multiple-validator.ts:24 (opens in a new tab)


transform()

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

Parameters

ParameterType
cellInfoIValidatorCellInfo<Nullable<CellValue>>
formulaIFormulaResult<any>
ruleIDataValidationRule

Returns

IValidatorCellInfo<CellValue>

Inherited from

ListValidator.transform

Defined in

data-validation/src/validators/base-data-validator.ts:144 (opens in a new tab)


validator()

validator(cellInfo, rule): Promise<boolean>

Parameters

ParameterType
cellInfoIValidatorCellInfo<Nullable<CellValue>>
ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

ListValidator.validator

Defined in

data-validation/src/validators/base-data-validator.ts:180 (opens in a new tab)


validatorFormula()

validatorFormula(
   rule, 
   unitId, 
   subUnitId): IFormulaValidResult

Parameters

ParameterType
ruleIDataValidationRule
unitIdstring
subUnitIdstring

Returns

IFormulaValidResult

Inherited from

ListValidator.validatorFormula

Defined in

sheets-data-validation/src/validators/list-validator.ts:105 (opens in a new tab)


validatorIsBetween()

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

Parameters

ParameterType
cellInfoIValidatorCellInfo<CellValue>
formulaIFormulaResult<any>
ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

ListValidator.validatorIsBetween

Defined in

data-validation/src/validators/base-data-validator.ts:156 (opens in a new tab)


validatorIsEqual()

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

Parameters

ParameterType
cellInfoIValidatorCellInfo<CellValue>
formulaIFormulaResult<any>
ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

ListValidator.validatorIsEqual

Defined in

data-validation/src/validators/base-data-validator.ts:148 (opens in a new tab)


validatorIsGreaterThan()

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

Parameters

ParameterType
cellInfoIValidatorCellInfo<CellValue>
formulaIFormulaResult<any>
ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

ListValidator.validatorIsGreaterThan

Defined in

data-validation/src/validators/base-data-validator.ts:164 (opens in a new tab)


validatorIsGreaterThanOrEqual()

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

Parameters

ParameterType
cellInfoIValidatorCellInfo<CellValue>
formulaIFormulaResult<any>
ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

ListValidator.validatorIsGreaterThanOrEqual

Defined in

data-validation/src/validators/base-data-validator.ts:168 (opens in a new tab)


validatorIsLessThan()

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

Parameters

ParameterType
cellInfoIValidatorCellInfo<CellValue>
formulaIFormulaResult<any>
ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

ListValidator.validatorIsLessThan

Defined in

data-validation/src/validators/base-data-validator.ts:172 (opens in a new tab)


validatorIsLessThanOrEqual()

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

Parameters

ParameterType
cellInfoIValidatorCellInfo<CellValue>
formulaIFormulaResult<any>
ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

ListValidator.validatorIsLessThanOrEqual

Defined in

data-validation/src/validators/base-data-validator.ts:176 (opens in a new tab)


validatorIsNotBetween()

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

Parameters

ParameterType
cellInfoIValidatorCellInfo<CellValue>
formulaIFormulaResult<any>
ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

ListValidator.validatorIsNotBetween

Defined in

data-validation/src/validators/base-data-validator.ts:160 (opens in a new tab)


validatorIsNotEqual()

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

Parameters

ParameterType
cellInfoIValidatorCellInfo<CellValue>
formulaIFormulaResult<any>
ruleIDataValidationRule

Returns

Promise<boolean>

Inherited from

ListValidator.validatorIsNotEqual

Defined in

data-validation/src/validators/base-data-validator.ts:152 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.