@univerjs/sheets-data-validation v0.5.4
Class: DateValidator
Defined in: sheets-data-validation/src/validators/date-validator.ts:49
Extends
Constructors
new DateValidator()
new DateValidator(localeService, injector): DateValidator
Defined in: data-validation/src/validators/base-data-validator.ts:79
Parameters
Parameter | Type |
---|---|
localeService | LocaleService |
injector | Injector |
Returns
Inherited from
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:73 |
dropdown | public | undefined | string | undefined | - | BaseDataValidator .dropdown | data-validation/src/validators/base-data-validator.ts:74 |
formulaInput | public | undefined | string | undefined | - | BaseDataValidator .formulaInput | data-validation/src/validators/base-data-validator.ts:72 |
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:81 |
localeService | readonly | LocaleService | undefined | - | BaseDataValidator .localeService | data-validation/src/validators/base-data-validator.ts:80 |
offsetFormulaByRange | public | boolean | true | - | BaseDataValidator .offsetFormulaByRange | data-validation/src/validators/base-data-validator.ts:68 |
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:75 |
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:94 |
title | public | string | 'dataValidation.date.title' | BaseDataValidator .title | - | sheets-data-validation/src/validators/date-validator.ts:51 |
Accessors
operatorNames
Get Signature
get operatorNames(): string[]
Defined in: sheets-data-validation/src/validators/date-validator.ts:159
Returns
string
[]
Overrides
BaseDataValidator
.operatorNames
titleStr
Get Signature
get titleStr(): string
Defined in: data-validation/src/validators/base-data-validator.ts:90
Returns
string
Inherited from
Methods
generateRuleErrorMessage()
generateRuleErrorMessage(rule, pos): string
Defined in: sheets-data-validation/src/validators/date-validator.ts:172
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
pos | ISheetLocationBase |
Returns
string
Overrides
BaseDataValidator
.generateRuleErrorMessage
generateRuleName()
generateRuleName(rule): string
Defined in: sheets-data-validation/src/validators/date-validator.ts:163
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
Returns
string
Overrides
BaseDataValidator
.generateRuleName
getExtraStyle()
getExtraStyle(
rule,
value,
ctx,
row,
column): Nullable<IStyleData>
Defined in: data-validation/src/validators/base-data-validator.ts:114
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
value | Nullable <CellValue > |
ctx | { style : IStyleData ; } |
ctx.style | IStyleData |
row | number |
column | number |
Returns
Inherited from
BaseDataValidator
.getExtraStyle
getRuleFinalError()
getRuleFinalError(rule, position): string
Defined in: data-validation/src/validators/base-data-validator.ts:116
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
position | ISheetLocationBase |
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
Parameter | Type |
---|---|
cellValue | Nullable <CellValue > |
Returns
cellValue is undefined | null | void
Inherited from
BaseDataValidator
.isEmptyCellValue
isValidType()
isValidType(info): Promise<boolean>
Defined in: sheets-data-validation/src/validators/date-validator.ts:81
Parameters
Parameter | Type |
---|---|
info | IValidatorCellInfo |
Returns
Promise
<boolean
>
Overrides
normalizeFormula()
normalizeFormula(
rule,
_unitId,
_subUnitId): {
formula1: undefined | string;
formula2: undefined | string;
}
Defined in: sheets-data-validation/src/validators/date-validator.ts:124
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
parseFormula()
parseFormula(
rule,
unitId,
subUnitId,
row,
column): Promise<IFormulaResult<undefined | number>>
Defined in: sheets-data-validation/src/validators/date-validator.ts:67
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
row | number |
column | number |
Returns
Promise
<IFormulaResult
<undefined
| number
>>
Overrides
BaseDataValidator
.parseFormula
transform()
transform(
cellInfo,
_formula,
_rule): IValidatorCellInfo<number>
Defined in: sheets-data-validation/src/validators/date-validator.ts:150
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
_formula | IFormulaResult |
_rule | IDataValidationRule |
Returns
IValidatorCellInfo
<number
>
Overrides
validator()
validator(cellInfo, rule): Promise<boolean>
Defined in: data-validation/src/validators/base-data-validator.ts:224
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
validatorFormula()
validatorFormula(
rule,
unitId,
subUnitId): IFormulaValidResult
Defined in: sheets-data-validation/src/validators/date-validator.ts:98
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
Overrides
BaseDataValidator
.validatorFormula
validatorIsBetween()
validatorIsBetween(
cellInfo,
formula,
_rule): Promise<boolean>
Defined in: data-validation/src/validators/base-data-validator.ts:170
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult |
rule | IDataValidationRule |
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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
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
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>