@univerjs/sheets-data-validation v0.5.0-beta.1 • Docs
Class: DateValidator
Extends
BaseDataValidator
<number
>
Constructors
new DateValidator()
new DateValidator(localeService, injector): DateValidator
Parameters
Parameter | Type |
---|---|
localeService | LocaleService |
injector | Injector |
Returns
Inherited from
Defined in
data-validation/src/validators/base-data-validator.ts:77
Properties
Property | Modifier | Type | Default value | Overrides | Inherited from | Defined in |
---|---|---|---|---|---|---|
canvasRender | public | Nullable <IBaseDataValidationWidget > | null | - | BaseDataValidator .canvasRender | data-validation/src/validators/base-data-validator.ts:71 |
dropdown | public | undefined | string | undefined | - | BaseDataValidator .dropdown | data-validation/src/validators/base-data-validator.ts:72 |
formulaInput | public | undefined | string | undefined | - | BaseDataValidator .formulaInput | data-validation/src/validators/base-data-validator.ts:70 |
id | public | string | DataValidationType.DATE | BaseDataValidator .id | - | sheets-data-validation/src/validators/date-validator.ts:50 |
injector | readonly | Injector | undefined | - | BaseDataValidator .injector | data-validation/src/validators/base-data-validator.ts:79 |
localeService | readonly | LocaleService | undefined | - | BaseDataValidator .localeService | data-validation/src/validators/base-data-validator.ts:78 |
operators | public | DataValidationOperator [] | undefined | BaseDataValidator .operators | - | sheets-data-validation/src/validators/date-validator.ts:52 |
optionsInput | public | undefined | string | undefined | - | BaseDataValidator .optionsInput | data-validation/src/validators/base-data-validator.ts:73 |
scopes | public | string | string [] | undefined | BaseDataValidator .scopes | - | sheets-data-validation/src/validators/date-validator.ts:63 |
skipDefaultFontRender | public | undefined | (rule , cellValue , pos ) => boolean | undefined | - | BaseDataValidator .skipDefaultFontRender | data-validation/src/validators/base-data-validator.ts:92 |
title | public | string | 'dataValidation.date.title' | BaseDataValidator .title | - | sheets-data-validation/src/validators/date-validator.ts:51 |
Accessors
operatorNames
Get Signature
get operatorNames(): string[]
Returns
string
[]
Overrides
BaseDataValidator
.operatorNames
Defined in
sheets-data-validation/src/validators/date-validator.ts:231
titleStr
Get Signature
get titleStr(): string
Returns
string
Inherited from
Defined in
data-validation/src/validators/base-data-validator.ts:88
Methods
generateRuleErrorMessage()
generateRuleErrorMessage(rule, pos): string
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
pos | ISheetLocationBase |
Returns
string
Overrides
BaseDataValidator
.generateRuleErrorMessage
Defined in
sheets-data-validation/src/validators/date-validator.ts:244
generateRuleName()
generateRuleName(rule): string
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
Returns
string
Overrides
BaseDataValidator
.generateRuleName
Defined in
sheets-data-validation/src/validators/date-validator.ts:235
getExtraStyle()
getExtraStyle(
rule,
value,
ctx,
row,
column): Nullable<IStyleData>
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
value | Nullable <CellValue > |
ctx | object |
ctx.style | IStyleData |
row | number |
column | number |
Returns
Inherited from
BaseDataValidator
.getExtraStyle
Defined in
data-validation/src/validators/base-data-validator.ts:112
getRuleFinalError()
getRuleFinalError(rule, position): string
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
position | ISheetLocationBase |
Returns
string
Inherited from
BaseDataValidator
.getRuleFinalError
Defined in
data-validation/src/validators/base-data-validator.ts:114
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:122
isValidType()
isValidType(info): Promise<boolean>
Parameters
Parameter | Type |
---|---|
info | IValidatorCellInfo <Nullable <CellValue >> |
Returns
Promise
<boolean
>
Overrides
Defined in
sheets-data-validation/src/validators/date-validator.ts:81
normalizeFormula()
normalizeFormula(
rule,
_unitId,
_subUnitId): {
formula1: undefined | string;
formula2: undefined | string;
}
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
_unitId | string |
_subUnitId | string |
Returns
{
formula1: undefined | string;
formula2: undefined | string;
}
Name | Type | Defined in |
---|---|---|
formula1 | undefined | string | sheets-data-validation/src/validators/date-validator.ts:124 |
formula2 | undefined | string | sheets-data-validation/src/validators/date-validator.ts:124 |
Overrides
BaseDataValidator
.normalizeFormula
Defined in
sheets-data-validation/src/validators/date-validator.ts:124
parseFormula()
parseFormula(
rule,
unitId,
subUnitId,
row,
column): Promise<IFormulaResult<undefined | number>>
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
row | number |
column | number |
Returns
Promise
<IFormulaResult
<undefined
| number
>>
Overrides
BaseDataValidator
.parseFormula
Defined in
sheets-data-validation/src/validators/date-validator.ts:67
transform()
transform(
cellInfo,
_formula,
_rule): IValidatorCellInfo<number>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
_formula | IFormulaResult <any > |
_rule | IDataValidationRule |
Returns
IValidatorCellInfo
<number
>
Overrides
Defined in
sheets-data-validation/src/validators/date-validator.ts:150
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:181
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/date-validator.ts:98
validatorIsBetween()
validatorIsBetween(
cellInfo,
formula,
_rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult <any > |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Overrides
BaseDataValidator
.validatorIsBetween
Defined in
sheets-data-validation/src/validators/date-validator.ts:178
validatorIsEqual()
validatorIsEqual(
cellInfo,
formula,
rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Overrides
BaseDataValidator
.validatorIsEqual
Defined in
sheets-data-validation/src/validators/date-validator.ts:159
validatorIsGreaterThan()
validatorIsGreaterThan(
cellInfo,
formula,
_rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult <any > |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Overrides
BaseDataValidator
.validatorIsGreaterThan
Defined in
sheets-data-validation/src/validators/date-validator.ts:199
validatorIsGreaterThanOrEqual()
validatorIsGreaterThanOrEqual(
cellInfo,
formula,
_rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult <any > |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Overrides
BaseDataValidator
.validatorIsGreaterThanOrEqual
Defined in
sheets-data-validation/src/validators/date-validator.ts:207
validatorIsLessThan()
validatorIsLessThan(
cellInfo,
formula,
_rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult <any > |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Overrides
BaseDataValidator
.validatorIsLessThan
Defined in
sheets-data-validation/src/validators/date-validator.ts:215
validatorIsLessThanOrEqual()
validatorIsLessThanOrEqual(
cellInfo,
formula,
_rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult <any > |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Overrides
BaseDataValidator
.validatorIsLessThanOrEqual
Defined in
sheets-data-validation/src/validators/date-validator.ts:223
validatorIsNotBetween()
validatorIsNotBetween(
cellInfo,
formula,
_rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult <any > |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Overrides
BaseDataValidator
.validatorIsNotBetween
Defined in
sheets-data-validation/src/validators/date-validator.ts:189
validatorIsNotEqual()
validatorIsNotEqual(
cellInfo,
formula,
_rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult <any > |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Overrides
BaseDataValidator
.validatorIsNotEqual
Defined in
sheets-data-validation/src/validators/date-validator.ts:169