@univerjs/sheets-data-validation v0.5.0-beta.1 • Docs
Class: FDataValidation
Constructors
new FDataValidation()
new FDataValidation(rule, worksheet?): FDataValidation
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
worksheet ? | FWorksheet |
Returns
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:30
Properties
Property | Type | Defined in |
---|---|---|
rule | IDataValidationRule | sheets-data-validation/src/facade/f-data-validation.ts:27 |
Methods
copy()
copy(): FDataValidationBuilder
Creates a new instance of FDataValidationBuilder using the current rule object. This method is useful for copying an existing data validation rule configuration.
Returns
A new FDataValidationBuilder instance with the same rule configuration.
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:77
delete()
delete(): boolean
Delete the data validation rule from the worksheet.
Returns
boolean
true if the rule is deleted successfully, false otherwise.
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:231
getAllowInvalid()
getAllowInvalid(): boolean
Gets whether invalid data is allowed based on the error style value.
Returns
boolean
true if invalid data is allowed, false otherwise.
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:40
getApplied()
getApplied(): boolean
Gets whether the data validation rule is applied to the worksheet.
Returns
boolean
true if the rule is applied, false otherwise.
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:86
getCriteriaType()
getCriteriaType(): DataValidationType
Gets the data validation type of the rule
Returns
The data validation type
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:49
getCriteriaValues()
getCriteriaValues(): (undefined | string)[]
Gets the values used for criteria evaluation
Returns
(undefined
| string
)[]
An array containing the operator, formula1, and formula2 values
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:58
getHelpText()
getHelpText(): undefined | string
Gets the help text information, which is used to provide users with guidance and support
Returns
undefined
| string
Returns the help text information. If there is no error message, it returns an undefined value.
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:67
getRanges()
getRanges(): FRange[]
Gets the ranges to which the data validation rule is applied.
Returns
FRange
[]
An array of IRange objects representing the ranges to which the data validation rule is applied.
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:105
getSheetId()
getSheetId(): undefined | string
Gets the sheetId of the worksheet.
Returns
undefined
| string
The sheetId of the worksheet.
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:137
getUnitId()
getUnitId(): undefined | string
Gets the title of the error message dialog box.
Returns
undefined
| string
The title of the error message dialog box.
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:128
setCriteria()
setCriteria(type, values): boolean
Set Criteria for the data validation rule.
Parameters
Parameter | Type | Description |
---|---|---|
type | DataValidationType | The type of data validation criteria. |
values | [DataValidationOperator , string , string ] | An array containing the operator, formula1, and formula2 values. |
Returns
boolean
true if the criteria is set successfully, false otherwise.
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:147
setOptions()
setOptions(options): boolean
Set the options for the data validation rule. For details of options, please refer to https://univer.ai/typedoc/@univerjs/core/interfaces/IDataValidationRuleOptions
Parameters
Parameter | Type | Description |
---|---|---|
options | Partial <IDataValidationRuleOptions > | An object containing the options to set. IDataValidationRuleOptions |
Returns
boolean
true if the options are set successfully, false otherwise.
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:181
setRanges()
setRanges(ranges): boolean
Set the ranges to the data validation rule.
Parameters
Parameter | Type | Description |
---|---|---|
ranges | FRange [] | new ranges array. |
Returns
boolean
true if the ranges are set successfully, false otherwise.
Defined in
sheets-data-validation/src/facade/f-data-validation.ts:208