Giter Site home page Giter Site logo

sadjow / yup-locale-pt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arfurlaneto/yup-locale-pt

0.0 1.0 0.0 264 KB

Brazilian Portuguese Localization for Yup (https://github.com/jquense/yup)

License: MIT License

JavaScript 16.61% TypeScript 83.39%

yup-locale-pt's Introduction

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);

yup-locale-pt's People

Contributors

arfurlaneto avatar jpmoura avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.