Search categories, packages and repositories

GitHub repositorywelitonsousa/mask

mask

welitonsousa/mask open-source repository details.

mask project cover
Stars
7
Forks
2
Last push (UTC)
May 19, 2023
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

Mask

- validations

  • Mask.validation.cpf
  • Mask.validation.cnpj
  • Mask.validation.cpfOrCnpj
  • Mask.validation.email
  • Mask.validation.money
  • Mask.validation.date
  • Mask.validation.dateTime
  • Mask.validation.time
  • Mask.validation.money
  • Mask.validation.phone
  • Mask.validation.generic

- Description

Validations are for you to be able to simply validate your field

- Masks

  • Mask.creditCard
  • Mask.cpf
  • Mask.cnpj
  • Mask.cpfOrCnpj
  • Mask.money
  • Mask.date
  • Mask.phone
  • Mask.generic

- Description

The masks are for you to be able to customize your field, according to that information

- Examples

// money mask and validation
TextFormField(
  autovalidateMode: AutovalidateMode.onUserInteraction,
  validator: (value) => Mask.validations.money(
    value, 
    min: 100.0, // optional field
  ),
  inputFormatters: [Mask.money()],
),

// cpf or cnpj mask and validation
TextFormField(
  validator: Mask.validations.cpfOrCnpj,
  inputFormatters: [Mask.cpfOrCnpj()],
),

// your custom mask and validation
TextFormField(
  validator: (value) => Mask.validations.generic(value, min:8, error: 'info erro'),
  inputFormatters: [
    Mask.generic(
      masks: ['##-##-##'], 
      hashtag: Hashtag.numbers, // optional field
    ),
  ),
)
screenshot - cpf validation example


Feito com ❤️ by Weliton Sousa

Weliton Sousa GitHub avatar
GitHub author

Weliton Sousa ↗

Sou desenvolvedor apaixonado por descobrir novas tecnologias. Gosto principalmente do desenvolvimento mobile, mas as tecs web e backend estão em dia 😉

FastzapPicos Piauí
LanguagesDartHTMLSwiftKotlinObjective-C

Packages published by this repository

Dependencies used

Dependency list 3 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}
  • flutter_lintsDevelopment^1.0.0

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗