npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@verific/vue-i18n

v0.4.0

Published

Vue I18n message adapter for Verific

Readme

@verific/vue-i18n

Vue I18n 11 message resolution for Verific.

Install

pnpm add @verific/core @verific/vue-i18n vue [email protected]

Start with shared errors

Connect the application-wide Composition API Composer once:

import { createVerific } from '@verific/core'
import { vueI18nMessages } from '@verific/vue-i18n'
import { createApp } from 'vue'
import { createI18n } from 'vue-i18n'
import App from './App.vue'

const i18n = createI18n({
  legacy: false,
  locale: 'en',
  messages: {
    en: {
      errors: {
        required: 'This field is required',
        invalidEmail: 'Enter a valid email address',
      },
    },
  },
})

const app = createApp(App)
app.use(i18n)
app.use(createVerific({
  messages: vueI18nMessages(i18n.global, {
    fallbackPrefix: 'errors',
  }),
}))
app.mount('#app')

errors, errorsFor() and errorFor() now return localised strings. If a key is missing, Verific falls back to the original Standard Schema error text.

Add a messagePrefix only when a form needs specific wording:

const { validate, errorsFor } = useValidation(schema, form, {
  messagePrefix: 'forms.signup',
})

For email and invalidEmail, the adapter tries:

  1. forms.signup.email.invalidEmail
  2. errors.invalidEmail
  3. the schema text

Vue I18n handles locale fallback, interpolation and pluralisation. Locale changes update derived errors without another validation run.

Options

vueI18nMessages(composer, {
  fallbackPrefix: 'errors',
  missing: 'warn', // 'warn', 'silent', 'throw', or a callback
  key: context => context.defaultKeys,
})
  • fallbackPrefix adds the shared {prefix}.{identifier} candidate.
  • missing warns by default outside production and is silent by default in production. Use 'throw' to make exercised missing keys fail tests, or pass a callback to collect structured diagnostics.
  • key replaces the ordered default candidates. Include context.defaultKeys to preserve them.

A component-local Composer is supported when the caller sets composer.fallbackRoot = false before creating the adapter. Pass that adapter through a registration's messages option; its translations are tried before inherited application messages. Each candidate is checked across the supplied Composer's locale chain before the next candidate, and the selected locale is used explicitly for translation.

Use missing: 'throw' in exercised tests and read errorsFor() after validation to fail on a missing key. For SSR, obtain the Composer from the current application or request; do not share a mutable Composer between requests. In Nuxt, create Vue I18n and Verific together inside each application plugin execution.

See the dedicated Vue I18n guide for a complete accessible form, locale switching, local Composers, missing-key tests and Nuxt guidance. See the message reference for the complete contract.

Licence

MIT