@univerjs/sheets-data-validation v0.4.2 • 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:76 (opens in a new tab)
Properties
Accessors
operatorNames
get operatorNames(): string[]
Returns
string
[]
Overrides
BaseDataValidator
.operatorNames
Defined in
sheets-data-validation/src/validators/date-validator.ts:240 (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(rule): string
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
Returns
string
Overrides
BaseDataValidator
.generateRuleErrorMessage
Defined in
sheets-data-validation/src/validators/date-validator.ts:253 (opens in a new tab)
generateRuleName()
generateRuleName(rule): string
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
Returns
string
Overrides
BaseDataValidator
.generateRuleName
Defined in
sheets-data-validation/src/validators/date-validator.ts:244 (opens in a new tab)
getExtraStyle()
getExtraStyle(
rule,
value,
ctx): Nullable<IStyleData>
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
value | Nullable <CellValue > |
ctx | object |
ctx.style | IStyleData |
Returns
Inherited from
BaseDataValidator
.getExtraStyle
Defined in
data-validation/src/validators/base-data-validator.ts:111 (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(info): Promise<boolean>
Parameters
Parameter | Type |
---|---|
info | IValidatorCellInfo <Nullable <CellValue >> |
Returns
Promise
<boolean
>
Overrides
Defined in
sheets-data-validation/src/validators/date-validator.ts:90 (opens in a new tab)
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:133 (opens in a new tab) |
formula2 | undefined | string | sheets-data-validation/src/validators/date-validator.ts:133 (opens in a new tab) |
Overrides
BaseDataValidator
.normalizeFormula
Defined in
sheets-data-validation/src/validators/date-validator.ts:133 (opens in a new tab)
parseFormula()
parseFormula(
rule,
unitId,
subUnitId): Promise<IFormulaResult<undefined | number>>
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
Promise
<IFormulaResult
<undefined
| number
>>
Overrides
BaseDataValidator
.parseFormula
Defined in
sheets-data-validation/src/validators/date-validator.ts:66 (opens in a new tab)
parseFormulaSync()
parseFormulaSync(
rule,
unitId,
subUnitId): {
formula1: undefined | number;
formula2: undefined | number;
}
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
{
formula1: undefined | number;
formula2: undefined | number;
}
Name | Type | Defined in |
---|---|---|
formula1 | undefined | number | sheets-data-validation/src/validators/date-validator.ts:85 (opens in a new tab) |
formula2 | undefined | number | sheets-data-validation/src/validators/date-validator.ts:86 (opens in a new tab) |
Defined in
sheets-data-validation/src/validators/date-validator.ts:80 (opens in a new tab)
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:159 (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/date-validator.ts:107 (opens in a new tab)
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:187 (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
>
Overrides
BaseDataValidator
.validatorIsEqual
Defined in
sheets-data-validation/src/validators/date-validator.ts:168 (opens in a new tab)
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:208 (opens in a new tab)
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:216 (opens in a new tab)
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:224 (opens in a new tab)
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:232 (opens in a new tab)
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:198 (opens in a new tab)
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:178 (opens in a new tab)