Zod schemas
LazyKit currently includes 9 Zod schemas. Their source files are flat and copyable; the groups below come from each page’s frontmatter.
Authentication
email-schemaValidates a trimmed email address and returns a branded value without changing its casing.
login-identifier-schemaAccepts either a valid email address or canonical username for sign-in.
password-confirmation-schemaValidates a password twice with the same schema and reports parsed-value mismatches on confirmation.
password-schemaValidates an NFC-normalized password by Unicode code-point length without trimming it.
strong-password-schemaProvides a 15-code-point password preset and a factory for exact blocklist checks.
username-schemaCanonicalizes and validates a URL-friendly username with branded output.
Forms
display-name-schemaValidates a trimmed, Unicode-normalized display label without restricting names to one writing system.
optional-form-fieldMakes any Zod schema optional while mapping an exact empty form value to undefined.
Formats
slug-schemaConverts a string into a canonical lowercase ASCII slug and returns a branded value.