English: CNPJValidator is a validator for CNPJ. CNPJ is a tax number assigned, in Brazil, to legal persons by the federal tax authorities. In Portuguese, the tax number is known as Cadastro Nacional de Pessoas Jurídicas.
Portuguese: CNPJValidator é um validador para CNPJ utilizando as regras oficiais de geração.
Documentation ¶
Requirements ¶
Yii 1.0 or above
Installation ¶
English: Extract the release file under a directory of your choice (e.g. protected/extensions/validators)
Portuguese: Descompacte o arquivo em um diretório de sua escolha (ex. protected/extensions/validators)
Usage ¶
English: In the model
Portuguese: No modelo
<?php
class MyModel extends CModel {
//[....]
public function rules()
{
return array(
//[....]
array('cnpj', 'ext.validators.CNPJValidator'),
);
}
}
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.