pipe stacks its checks and transforms in order (“trimmed, an email, at most 255 long”). Validation calls say what happens when the data doesn’t fit.
library: { name: "valibot", versions: ">=1 <2" }. It reads both import * as v from "valibot" and named imports, and only claims calls whose function really comes from valibot, so same-named functions from other libraries are left alone.
Examples
Schemas and pipes
English
Validation
English
What it covers
- Schemas: strings, numbers, booleans, dates, literals,
picklist,enum,objectand its strict and loose variants,array,tuple,record,union,variantand object helpers such aspick,omitandpartial. - Wrappers:
optional,nullable,nullishand defaults. - Pipes: checks such as
email,minLength,maxValueandregex, transforms such astrim, custom messages, and checks forwarded to a field. - Validation:
parse,safeParse,is,assert,parserand their async variants. describeSchema, so plugins that describe schemas, such as tRPC for procedure inputs, can read Valibot schemas too.
Translating
The English phrasebook is exported asen and typed as ValibotPhrases.