Install
Works with Drupal: 7.xUsing Composer to manage Drupal site dependencies
Downloads
Download tar.gz
8 KB
MD5: 6c243ebdcfa145ee8c714c9b6eeced14
SHA-1: 8908eaecbe38f1f87ffc2cb14ddb7adb9bb8bd04
SHA-256: 9d7848ed55a6cea44db5a34f19eedda94f2eba385944811f54c0197fabfd0456
Download zip
8.57 KB
MD5: 48f22acf51faedecd7bdcc891ce45185
SHA-1: 2c7b0130adb422870f1d497ecd7eee717b8aa17f
SHA-256: 3baa47905998588b22b1a9a56061978bd426a9b7f4afc7b576adaa97c50f24d1
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.