0.0.9 • Published 3 years ago

yup-locale-pt v0.0.9

Weekly downloads
140
License
-
Repository
github
Last release
3 years ago

Brazilian Portuguese Localization for Yup

Ler em Português

Flavors

There are three "flavors" of translation:

  • pt is the default translation of Yup's locale.js file. Example: 'name must be exactly 20 characters'.
  • ptForm is optimized to be shown in form fields. It does not repeat the field name and is formatted like a sentence. Example: 'The field must be exactly 20 characters.'.
  • ptShort is like ptForm, but shorter. Example: 'Must be exactly 20 characters.' .

Usage

Install with npm ...

npm install yup-locale-pt

... or with yarn ...

yarn add yup-locale-pt

... and set locale with Yup's setLocale...

import * as Yup from 'yup';
import { pt } from 'yup-locale-pt';

Yup.setLocale(pt);

...or...

import * as Yup from 'yup';
import { ptForm } from 'yup-locale-pt';

Yup.setLocale(ptForm);

...or...

import * as Yup from 'yup';
import { ptShort } from 'yup-locale-pt';

Yup.setLocale(ptShort);
0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago