Sha256: 0d0b6d8192deec2bcaf6fc7abd9332a0643a7a07bb262915d40a379931a98536
Contents?: true
Size: 886 Bytes
Versions: 4
Compression:
Stored size: 886 Bytes
Contents
= ValidatesCNPJ {<img src="https://secure.travis-ci.org/plribeiro3000/validates_cnpj.png" />}[http://travis-ci.org/plribeiro3000/validates_cnpj] Rails gem to validate CNPJ. Don't forget to check {ValidatesCpf}[https://github.com/plribeiro3000/validates_cpf], {ValidatesTelephone}[https://github.com/plribeiro3000/validates_telephone] and {ValidatesHost}[https://github.com/plribeiro3000/validates_host]. == Install gem install validates_cnpj == Usage Lets say you have a model with "cnpj" string column that you want to be a valid CNPJ. Just add this to your model: class User < ActiveRecord::Base validates :cnpj, :cnpj => true end == Test This gem has builtin matchers for shoulda-matchers and remarkable. == Notes Since version 1.0.0, it isn't necessary to load any file inside your spec_helper anymore. == Contribute Fork the project and send me a Pull Request. =D
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
validates_cnpj-1.1.3 | README.rdoc |
validates_cnpj-1.1.2 | README.rdoc |
validates_cnpj-1.1.1 | README.rdoc |
validates_cnpj-1.1.0 | README.rdoc |