Sha256: 9796292131505c44e66424c2accdd7022eeebddfed6a7fa614e02db6c97ef4c9
Contents?: true
Size: 596 Bytes
Versions: 2
Compression:
Stored size: 596 Bytes
Contents
= ValidatesCPF Rails gem to validate CPF == Install gem install validates_cpf == Usage Lets say you have a model with "cpf" string column that you want to be a valid CPF. Just add this to your model: class User < ActiveRecord::Base validates :cpf, :cpf => true end == Test Only Rspec supported at the moment and has shoulda-matchers as dependecy. === How? You should use validates_as_cpf(:attribute) just like any other shoulda matcher. == Special Thanks This project is based on brcpfcnpj gem and his intention it to mantain a cleaner code to validate CPF and macros for test it.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
validates_cpf-0.1.1 | README.rdoc |
validates_cpf-0.1.0 | README.rdoc |