PHPackages                             vesperabr/fieldtize - 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. vesperabr/fieldtize

ActiveLibrary

vesperabr/fieldtize
===================

Parse, validate and format fields easily.

0.1.0(3y ago)04MITPHPPHP ^7.3|^8.0

Since Oct 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/vesperabr/fieldtize)[ Packagist](https://packagist.org/packages/vesperabr/fieldtize)[ Docs](https://github.com/vesperabr/fieldtize)[ RSS](/packages/vesperabr-fieldtize/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Fieldtize
=========

[](#fieldtize)

Parse, validate and format common fields in an easy way.

- [Installation](#installation)
- [Methods](#methods)
- [Fields](#fields)
    - [Phone](#phone)
- [Testing](#testing)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install the package via composer:

```
$ composer require vesperabr/fieldtize
```

Methods
-------

[](#methods)

Every field class has at least this methods:

- `make()` Returns the field class instance.
- `original()` Returns the original value passed to the class.
- `get()` Returns the formatted value or null if value is invalid.
- `raw()` Returns the value without any masks or null if value is invalid.
- `isValid()` Returns true or false if value is invalid.

Fields
------

[](#fields)

### Phone

[](#phone)

```
use Vespera\Fieldtize\Fields\Phone;

$phone = Phone::make('1144443333');
$phone->original(); // '1144443333'
$phone->get();      // '(11) 4444-3333'
$phone->raw();      // '+551144443333'
$phone->isValid();  // true
echo $phone;        // '(11) 4444-3333'
```

Todo
----

[](#todo)

- Phone field: `getUri()` method
- Phone field: `getWhatsappUri()` method
- Phone field: `getInternationalNumber()` method
- Phone field: `getType()` method
- Phone field: `getCountry()` method
- CPF field
- CNPJ field
- CPF/CNPJ field
- CEP field
- E-mail field

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Ricardo Monteiro](https://github.com/ricazao)
- [libphonenumber for PHP](https://github.com/giggsey/libphonenumber-for-php)

License
-------

[](#license)

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

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1287d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7110502?v=4)[Ricardo Monteiro](/maintainers/ricazao)[@ricazao](https://github.com/ricazao)

---

Top Contributors

[![ricazao](https://avatars.githubusercontent.com/u/7110502?v=4)](https://github.com/ricazao "ricazao (5 commits)")

---

Tags

phonefieldsnumbers

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vesperabr-fieldtize/health.svg)

```
[![Health](https://phpackages.com/badges/vesperabr-fieldtize/health.svg)](https://phpackages.com/packages/vesperabr-fieldtize)
```

###  Alternatives

[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M106](/packages/propaganistas-laravel-phone)[brick/phonenumber

Phone number library

4347.1M39](/packages/brick-phonenumber)[rynpsc/craft-phone-number

International phone number field.

2265.9k](/packages/rynpsc-craft-phone-number)[ipub/phone

Phone helper &amp; validator for Nette Framework

1285.3k6](/packages/ipub-phone)

PHPackages © 2026

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