Installation
Add NotForm and a validation library to your project.
Setup
Install the package
pnpm add notform
yarn add notform
npm install notform
bun add notform
Install a validation library
NotForm accepts any Standard Schema compliant validator. Pick one.
pnpm add zod
TypeScript-first schema validation. Recommended for most projects.
pnpm add valibot
Modular and tree-shakeable. Ideal when bundle size matters.
pnpm add arktype
TypeScript-native runtime validation with minimal overhead.
pnpm add yup
Widely-used chainable schema builder.
You only need one library. NotForm's API does not change between validators.
Verify
<script setup lang="ts">
import { useNotForm, NotForm, NotField, NotMessage, NotArrayField } from 'notform'
// No errors — you're ready.
</script>
Nuxt
If you are on Nuxt, register the module to get auto-imports for all components and useNotForm:
nuxt.config.ts
export default defineNuxtConfig({
modules: ['notform-nuxt'],
})
After this, useNotForm, <NotForm>, <NotField>, <NotMessage>, and <NotArrayField> are available in every component and composable without importing.
See Nuxt Module for details.