yup-locale-ja

Japanese localization for yup messages, with translation flavors.
README (日本語)
Getting Started
$ yarn add yup yup-locale-ja
$ npm i yup yup-locale-ja
then, set a locale object as yup's default message dictionary with setLocale
function.
import { setLocale } from "yup";
import * as ja from "yup-locale-ja";
setLocale(ja.suggestive);
For more info, see yup's README.
Translation Flavors
This package comes with two flavors: descriptive and suggestive.
descriptive is such like "~です" ("... is ...") form, which simply describe the field's attribute.
In contrast, suggestive messages show a user an action to fix the error, such as "~してください" ("Please do ...").
import * as ja from "yup-locale-ja";
ja.suggestive;
ja.descriptive;
How to show a field label?
Add a label by calling .label
method on the field.
This package omits a field path unless a label is set.
Similar Projects