PHPackages                             rmsramos/postal-code - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rmsramos/postal-code

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rmsramos/postal-code
====================

CEP integration with ViaCep

v0.1.1(2y ago)71182MITPHPPHP ^8.1

Since Sep 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/rmsramos/postal-code)[ Packagist](https://packagist.org/packages/rmsramos/postal-code)[ Docs](https://github.com/rmsramos/postal-code)[ RSS](/packages/rmsramos-postal-code/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (2)Dependencies (12)Versions (3)Used By (0)

Filament CEP integration with ViaCep
====================================

[](#filament-cep-integration-with-viacep)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a3c2131cd64d4bb02506375a07528f6e373e1b5241318576783f2c83bdd76741/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726d7372616d6f732f706f7374616c2d636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rmsramos/postal-code)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/5d23d294d5581d225d87c1c9298cbdea2154e1d0be2d74b25eb11a0e38e355fd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f726d7372616d6f732f706f7374616c2d636f64652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/rmsramos/postal-code/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/a923e7be77697863b194073381225bc88ae8eeca5408438b213a0452ea5d3511/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726d7372616d6f732f706f7374616c2d636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rmsramos/postal-code)

This package provides custom form field for Filament integration with ViaCep.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require rmsramos/postal-code
```

Usage
-----

[](#usage)

```
use Filament\Forms\Components\TextInput;
use Rmsramos\PostalCode\Components\PostalCode;

public static function form(Form $form): Form
{
    return $form
        ->schema([
            PostalCode::make('postal_code')
                ->viaCep(
                    errorMessage: 'CEP inválido.', // Custom message to display if the CEP is invalid.
                    setFields: [
                        'street'        => 'logradouro',
                        'number'        => 'numero',
                        'complement'    => 'complemento',
                        'district'      => 'bairro',
                        'city'          => 'localidade',
                        'state'         => 'uf'
                    ]
                ),

            TextInput::make('street'),
            TextInput::make('number')
                 ->extraAlpineAttributes([
                     'x-on:cep.window' => "\$el.focus()",
                 ]),,
            TextInput::make('complement'),
            TextInput::make('district'),
            TextInput::make('city'),
            TextInput::make('state'),
        ])
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Rômulo Ramos](https://github.com/rmsramos)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~266 days

Total

2

Last Release

748d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5170473?v=4)[Rômulo Ramos](/maintainers/rmsramos)[@rmsramos](https://github.com/rmsramos)

---

Top Contributors

[![rmsramos](https://avatars.githubusercontent.com/u/5170473?v=4)](https://github.com/rmsramos "rmsramos (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

filamentlaravelviacep-apilaravelfilamentpostal-codeRmsramos

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/rmsramos-postal-code/health.svg)

```
[![Health](https://phpackages.com/badges/rmsramos-postal-code/health.svg)](https://phpackages.com/packages/rmsramos-postal-code)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

328482.0k25](/packages/codewithdennis-filament-select-tree)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

128173.7k3](/packages/dotswan-filament-map-picker)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17758.9k2](/packages/stephenjude-filament-jetstream)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

57301.3k3](/packages/creagia-filament-code-field)[tapp/filament-form-builder

User facing form builder using Filament components

141.9k2](/packages/tapp-filament-form-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
