Socket
Book a DemoInstallSign in
Socket

validate_cnpj

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validate_cnpj

0.1.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

ValidateCnpj

To read this documentation in English click here.

Adds CNPJ validation support to Rails (ActiveModel) and test it in a simple way.

Installation

Add this line to your application's Gemfile:

gem 'validate_cnpj'

And then execute:

$ bundle

Or install it yourself as:

$ gem install validate_cnpj

Usage

Just use as any other validator:

class User < ActiveRecord::Base
    validates :cnpj, cnpj: true
end

Error Message

If you need to localize the error message, just add this to your I18n locale file:

errors:
  messages:
    this_document_is_invalid: "This document is invalid"

You can provide your own message using :message option.

validates :cnpj, cnpj: {message: "new error message"}

Mantainers

RamonHossein

Contributors

To see the generous people who have contributed code, take a look at the contributors list.

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Added some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 15 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.