{"id":15704885,"url":"https://github.com/pedrofurtado/validates-correios-cep","last_synced_at":"2026-02-28T22:02:55.500Z","repository":{"id":48261879,"uuid":"89884396","full_name":"pedrofurtado/validates-correios-cep","owner":"pedrofurtado","description":"Brazilian zipcode validation for ActiveRecord, integrated with correios-cep gem.","archived":false,"fork":false,"pushed_at":"2021-08-04T01:25:47.000Z","size":21,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-06T06:04:05.916Z","etag":null,"topics":["activemodel","activerecord","cep","prodis","rails"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/validates-correios-cep","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pedrofurtado.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-30T23:54:31.000Z","updated_at":"2024-03-09T21:49:11.000Z","dependencies_parsed_at":"2022-08-30T04:52:00.294Z","dependency_job_id":null,"html_url":"https://github.com/pedrofurtado/validates-correios-cep","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/pedrofurtado/validates-correios-cep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrofurtado%2Fvalidates-correios-cep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrofurtado%2Fvalidates-correios-cep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrofurtado%2Fvalidates-correios-cep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrofurtado%2Fvalidates-correios-cep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedrofurtado","download_url":"https://codeload.github.com/pedrofurtado/validates-correios-cep/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrofurtado%2Fvalidates-correios-cep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29953212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activemodel","activerecord","cep","prodis","rails"],"created_at":"2024-10-03T20:14:10.881Z","updated_at":"2026-02-28T22:02:51.999Z","avatar_url":"https://github.com/pedrofurtado.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# validates-correios-cep\n\n[![Gem Version](https://badge.fury.io/rb/validates-correios-cep.svg)](https://badge.fury.io/rb/validates-correios-cep)\n[![Gem](https://img.shields.io/gem/dt/validates-correios-cep.svg)]()\n[![CI](https://github.com/pedrofurtado/validates-correios-cep/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/pedrofurtado/validates-correios-cep/actions/workflows/ci.yml)\n[![license](https://img.shields.io/github/license/pedrofurtado/validates-correios-cep.svg)]()\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'validates-correios-cep'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install validates-correios-cep\n\n## Usage\n\n### ActiveRecord models\n```ruby\nclass Person \u003c ActiveRecord::Base\n  validates :my_attribute, correios_cep: true\n\n  # or\n\n  validates_correios_cep_of :my_attribute\nend\n```\n\n### Plain Old Ruby Objects\n```ruby\nclass Person\n  include ActiveModel::Model\n\n  validates :my_attribute, correios_cep: true\n\n  # or\n\n  validates_correios_cep_of :my_attribute\nend\n```\n\n## I18n\n\nTo customize your error messages you can create a locale file like this:\n\n```yaml\nen:\n  correios_cep:\n    errors:\n      messages:\n        not_exists: '%{zipcode} is not a existent Brazilian zipcode'\n        connection_failed: 'failure on connection with Brazilian Correios API'\n        invalid: '%{zipcode} is not a valid Brazilian zipcode'\n        timeouted: 'timeout with Brazilian Correios API'\n```\n\nThe %{zipcode} contains the zipcode value, filled by user.\n\n## Something wrong with the translations? Contribute it!\n\nSend a pull request! Fix the translations or create it for some missing locale. Help us to improves the quality of translations!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrofurtado%2Fvalidates-correios-cep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedrofurtado%2Fvalidates-correios-cep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrofurtado%2Fvalidates-correios-cep/lists"}