Files
upstream-mirror bcf6ef63ad
Some checks failed
📦 Build / build (push) Has been cancelled
🧪 CI Test / test shard (1/4) (push) Has been cancelled
🧪 CI Test / test shard (2/4) (push) Has been cancelled
🧪 CI Test / test shard (3/4) (push) Has been cancelled
🧪 CI Test / test shard (4/4) (push) Has been cancelled
🧪 CI Test / test (push) Has been cancelled
🧪 CI Test / eslint (push) Has been cancelled
🧪 CI Test / typecheck (push) Has been cancelled
🔫 Sync to Pro / dispatch-sync (push) Has been cancelled
🔮 Sync Mirror / sync (push) Has been cancelled
snapshot of https://github.com/dream-num/univer.git (dev, 2026-09-16; blobs > 131072B omitted)
2026-09-16 05:09:45 +05:00

47 lines
1.5 KiB
Markdown

# @univerjs/data-validation
[![npm version](https://img.shields.io/npm/v/@univerjs/data-validation?style=flat-square)](https://npmjs.com/package/@univerjs/data-validation)
[![license](https://img.shields.io/npm/l/@univerjs/data-validation?style=flat-square)](https://npmjs.com/package/@univerjs/data-validation)
[![downloads](https://img.shields.io/npm/dm/@univerjs/data-validation?style=flat-square)](https://npmjs.com/package/@univerjs/data-validation)
`@univerjs/data-validation` provides the shared data validation model and rule services used by sheet data validation features.
## Package Overview
| Package | UMD global | CSS | Locales | Facade entry |
| --- | --- | :---: | :---: | :---: |
| `@univerjs/data-validation` | `UniverDataValidation` | No | Yes | No |
## Installation
```sh
pnpm add @univerjs/data-validation
# or
npm install @univerjs/data-validation
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { LocaleType, mergeLocales, Univer } from '@univerjs/core';
import { UniverDataValidationPlugin } from '@univerjs/data-validation';
import DataValidationEnUS from '@univerjs/data-validation/locale/en-US';
const univer = new Univer({
locale: LocaleType.EN_US,
locales: {
[LocaleType.EN_US]: mergeLocales(DataValidationEnUS),
},
});
univer.registerPlugin(UniverDataValidationPlugin);
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/data-validation)
- [GitHub repository](https://github.com/dream-num/univer)