Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 792 Bytes

README.rdoc

File metadata and controls

28 lines (17 loc) · 792 Bytes

phones-brazil

Validates Brazilian phone numbers. Currently works only for cellphones.

Validates area code (2 digits and existing area code) and cellphone number size, which is currently 9 digits for the following states: AC, AL, AM, AP, BA, CE, DF, ES, GO, MA, MG, MT, MS, PA, PB, PE, PI, PR, RJ, RN, RO, RR, RS, SC, SE, SP. The rest of Brazilian states uses 8 digits.

Usage

class Phone < ActiveRecord::Base
  validates_with PhonesBrazil::Validator::CellPhoneValidator
end

Ruby Versions

Tested against version 1.9.3

Authors

Ricardo Shiota Yasuda (@shadowmaru) Nícolas Marçal (@nicolasmarcal) Dafny Domiciana (@dafny) Ícaro Torres (@icarovts)

Copyright © 2013 Bio Ritmo Academias (www.bioritmo.com.br). See LICENSE.txt for further details.