module
CNPJ::Validator
Overview
Provides CNPJ identifier validation method
Extended Modules
Defined in:
cnpj/validator.crInstance Method Summary
-
#valid?(value : String) : Bool
Returns
true
if the given value is a valid CNPJ value, otherwise returns false
Instance Method Detail
def valid?(value : String) : Bool
#
Returns true
if the given value is a valid CNPJ value, otherwise
returns false
CNPJ::Validator.valid?("11111111111111") # => false
CNPJ::Validator.valid?("24485147000187") # => true
CNPJ::Validator.valid?("24.485.147/0001-87") # => true