Files
upstream-univer/packages/sheets-data-validation/README.md
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

51 lines
1.8 KiB
Markdown

# @univerjs/sheets-data-validation
[![npm version](https://img.shields.io/npm/v/@univerjs/sheets-data-validation?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-data-validation)
[![license](https://img.shields.io/npm/l/@univerjs/sheets-data-validation?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-data-validation)
[![downloads](https://img.shields.io/npm/dm/@univerjs/sheets-data-validation?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-data-validation)
`@univerjs/sheets-data-validation` connects shared data validation rules to Univer Sheets and provides sheet-specific commands, services, and Facade APIs.
## Package Overview
| Package | UMD global | CSS | Locales | Facade entry |
| --- | --- | :---: | :---: | :---: |
| `@univerjs/sheets-data-validation` | `UniverSheetsDataValidation` | No | Yes | Yes |
## Installation
```sh
pnpm add @univerjs/sheets-data-validation
# or
npm install @univerjs/sheets-data-validation
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { LocaleType, mergeLocales, Univer } from '@univerjs/core';
import { UniverSheetsDataValidationPlugin } from '@univerjs/sheets-data-validation';
import EnUS from '@univerjs/sheets-data-validation/locale/en-US';
const univer = new Univer({
locale: LocaleType.EN_US,
locales: {
[LocaleType.EN_US]: mergeLocales(EnUS),
},
});
univer.registerPlugin(UniverSheetsDataValidationPlugin);
```
## Integration Notes
Use this package with `@univerjs/sheets-data-validation-ui` when users need validation dialogs, dropdowns, and error UI.
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/sheets-data-validation)
- [GitHub repository](https://github.com/dream-num/univer)