validates_cpf_cnpj
validates_cpf_cnpj copied to clipboard
Improvements and Corrections: separated validations for CPF and CNPJ, added dependencies, updated tests to Rspec3, make validation keep original value, value normalization after validation & some bug fixes.
The CPNJ 00.000.000/0000-00 was been considered valid. Now the CNPJ fields are invalid when there are 14 or more repeated chars: (00...0, 11...1, ..., 99..9).
Added the missing option :message to the validation.