Install

Works with Drupal: 7.x

Using dev releases is not recommended, except for testing.

Using Composer to manage Drupal site dependencies

Downloads

Download tar.gz 9.73 KB
MD5: f89c47feae4b061c85cf7cfcae49da31
SHA-1: a55e55c3e9b84d67c752995fc27ca7f4187d0ead
SHA-256: 6b9c43cca30487443e10971a2a5e040629e49bcc2fa7fecab78047f795b34d57
Download zip 10.68 KB
MD5: 9dc1ffbbd7087de11ae972f7d399ac10
SHA-1: 687c212e97f6aa7bce364dd181c4601ba5fbc9ee
SHA-256: 67afa8f7f00c8f165acb6d31c4ba5e9c47196df7a6baeff7f45636d861504afe

Release notes

This module adds 3 new widgets to the text field type at the Field UI.

They are:
CPF - Accepts only valid tax number of individuals
CNPJ - Accepts only valid tax number of companies
CPF / CNPJ - Accepts either one as long as it is a valid number

Learn more about these Brazilian tax numbers at wikipedia:
CPF and CNPJ

The view format display are done as followed:
CPF - 999.999.999-99
CNPJ - 99.999.999/9999-99

This module also adds 3 new field types for the Form API.
They are:
number_cpf, number_cnpj and number_cnpj_cpf

So, developers can easily build form elements of Brazilian Tax Number types. For example:

  $form['my_cpf_field'] = array(
    '#type' => 'number_cpf',
    '#title' => t('CPF'),
  );
  $form['my_cnpj_field'] = array(
    '#type' => 'number_cnpj',
    '#title' => t('CNPJ'),
  );
  $form['my_cnpj_cpf_field'] = array(
    '#type' => 'number_cnpj_cpf',
    '#title' => t('CNPJ or CPF'),
  );

And that's it! You are done.

Created by: FranciscoLuz
Created on: 29 Aug 2011 at 23:00 UTC
Last updated: 23 Jan 2018 at 22:18 UTC
New features

Other releases