@univerjs/data-validation v0.4.2 • Docs
Class: DataValidationModel
Extends
Constructors
new DataValidationModel()
new DataValidationModel(_logService): DataValidationModel
Parameters
Parameter | Type |
---|---|
_logService | ILogService |
Returns
Overrides
Defined in
data-validation/src/models/data-validation-model.ts:48 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | core/src/shared/lifecycle.ts:93 (opens in a new tab) |
ruleChange$ | public | Observable <IRuleChange > | undefined | - | data-validation/src/models/data-validation-model.ts:45 (opens in a new tab) |
ruleChangeDebounce$ | public | Observable <IRuleChange > | undefined | - | data-validation/src/models/data-validation-model.ts:46 (opens in a new tab) |
Methods
addRule()
addRule(
unitId,
subUnitId,
rule,
source,
index?): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IDataValidationRule | IDataValidationRule [] |
source | DataValidationChangeSource |
index ? | number |
Returns
void
Defined in
data-validation/src/models/data-validation-model.ts:151 (opens in a new tab)
deleteUnitRules()
deleteUnitRules(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Defined in
data-validation/src/models/data-validation-model.ts:238 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
core/src/shared/lifecycle.ts:106 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
core/src/shared/lifecycle.ts:100 (opens in a new tab)
getAll()
getAll(): readonly [string, [string, IDataValidationRule[]][]][]
Returns
readonly [string
, [string
, IDataValidationRule
[]][]][]
Defined in
data-validation/src/models/data-validation-model.ts:246 (opens in a new tab)
getRuleById()
getRuleById(
unitId,
subUnitId,
ruleId): undefined | IDataValidationRule
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
Returns
undefined
| IDataValidationRule
Defined in
data-validation/src/models/data-validation-model.ts:209 (opens in a new tab)
getRuleIndex()
getRuleIndex(
unitId,
subUnitId,
ruleId): number
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
Returns
number
Defined in
data-validation/src/models/data-validation-model.ts:214 (opens in a new tab)
getRules()
getRules(unitId, subUnitId): IDataValidationRule[]
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
Defined in
data-validation/src/models/data-validation-model.ts:219 (opens in a new tab)
getSubUnitIds()
getSubUnitIds(unitId): string[]
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
string
[]
Defined in
data-validation/src/models/data-validation-model.ts:242 (opens in a new tab)
getUnitRules()
getUnitRules(unitId): [string, IDataValidationRule[]][]
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
[string
, IDataValidationRule
[]][]
Defined in
data-validation/src/models/data-validation-model.ts:224 (opens in a new tab)
removeRule()
removeRule(
unitId,
subUnitId,
ruleId,
source): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
source | DataValidationChangeSource |
Returns
void
Defined in
data-validation/src/models/data-validation-model.ts:190 (opens in a new tab)
updateRule()
updateRule(
unitId,
subUnitId,
ruleId,
payload,
source): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
payload | IUpdateRulePayload |
source | DataValidationChangeSource |
Returns
void
Defined in
data-validation/src/models/data-validation-model.ts:168 (opens in a new tab)