@univerjs/sheets-data-validation v0.4.2 • Docs
Class: ListValidator
Extends
Extended by
Constructors
new ListValidator()
new ListValidator(localeService, injector): ListValidator
Parameters
Parameter | Type |
---|---|
localeService | LocaleService |
injector | Injector |
Returns
Inherited from
Defined in
data-validation/src/validators/base-data-validator.ts:76 (opens in a new tab)
Properties
Accessors
operatorNames
get operatorNames(): string[]
Returns
string
[]
Inherited from
BaseDataValidator
.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
Defined in
data-validation/src/validators/base-data-validator.ts:87 (opens in a new tab)
Methods
generateRuleErrorMessage()
generateRuleErrorMessage(): string
Returns
string
Overrides
BaseDataValidator
.generateRuleErrorMessage
Defined in
sheets-data-validation/src/validators/list-validator.ts:173 (opens in a new tab)
generateRuleName()
generateRuleName(): string
Returns
string
Overrides
BaseDataValidator
.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
Parameter | Type |
---|---|
rule | IDataValidationRule |
value | Nullable <CellValue > |
__namedParameters | object |
__namedParameters.style | IStyleData |
Returns
Overrides
BaseDataValidator
.getExtraStyle
Defined in
sheets-data-validation/src/validators/list-validator.ts:123 (opens in a new tab)
getList()
getList(
rule,
currentUnitId?,
currentSubUnitId?): string[]
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
currentUnitId ? | string |
currentSubUnitId ? | string |
Returns
string
[]
Defined in
sheets-data-validation/src/validators/list-validator.ts:177 (opens in a new tab)
getListAsync()
getListAsync(
rule,
currentUnitId?,
currentSubUnitId?): Promise<string[]>
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
currentUnitId ? | string |
currentSubUnitId ? | string |
Returns
Promise
<string
[]>
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
Parameter | Type |
---|---|
rule | IDataValidationRule |
currentUnitId ? | string |
currentSubUnitId ? | string |
Returns
{
color
: string
;
label
: string
;
}[]
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
Parameter | Type |
---|---|
rule | IDataValidationRule |
currentUnitId ? | string |
currentSubUnitId ? | string |
Returns
Record
<string
, string
>
Defined in
sheets-data-validation/src/validators/list-validator.ts:214 (opens in a new tab)
getRuleFinalError()
getRuleFinalError(rule): string
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
Returns
string
Inherited from
BaseDataValidator
.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
Parameter | Type |
---|---|
cellValue | Nullable <CellValue > |
Returns
cellValue is undefined | null | void
Inherited from
BaseDataValidator
.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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <Nullable <CellValue >> |
formula | IFormulaResult <undefined | string []> |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Overrides
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
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
{
formula1: rule.formula1;
formula2: rule.formula2;
}
Name | Type | Default value | Defined in |
---|---|---|---|
formula1 | undefined | string | rule.formula1 | data-validation/src/validators/base-data-validator.ts:135 (opens in a new tab) |
formula2 | undefined | string | rule.formula2 | data-validation/src/validators/base-data-validator.ts:136 (opens in a new tab) |
Inherited from
BaseDataValidator
.normalizeFormula
Defined in
data-validation/src/validators/base-data-validator.ts:133 (opens in a new tab)
parseCellValue()
parseCellValue(cellValue): string[]
Parameters
Parameter | Type |
---|---|
cellValue | CellValue |
Returns
string
[]
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
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
Promise
<IFormulaResult
<undefined
| string
[]>>
Overrides
BaseDataValidator
.parseFormula
Defined in
sheets-data-validation/src/validators/list-validator.ts:149 (opens in a new tab)
skipDefaultFontRender()
skipDefaultFontRender(rule): boolean
Parameters
Parameter | Type |
---|---|
rule | ISheetDataValidationRule |
Returns
boolean
Overrides
BaseDataValidator.skipDefaultFontRender
Defined in
sheets-data-validation/src/validators/list-validator.ts:101 (opens in a new tab)
transform()
transform(
cellInfo,
formula,
rule): IValidatorCellInfo<CellValue>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <Nullable <CellValue >> |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Inherited from
Defined in
data-validation/src/validators/base-data-validator.ts:144 (opens in a new tab)
validator()
validator(cellInfo, rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <Nullable <CellValue >> |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
Defined in
data-validation/src/validators/base-data-validator.ts:180 (opens in a new tab)
validatorFormula()
validatorFormula(
rule,
unitId,
subUnitId): IFormulaValidResult
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
Overrides
BaseDataValidator
.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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsNotEqual
Defined in
data-validation/src/validators/base-data-validator.ts:152 (opens in a new tab)