Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
@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 | Worker entry |
|---|---|---|---|---|---|
@univerjs/data-validation |
UniverDataValidation |
No | Yes | No | No |
Installation
pnpm add @univerjs/data-validation
# or
npm install @univerjs/data-validation
Usage
Start with the integration setup for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.
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);