PHPackages                             ivanomatteo/laravel-codice-fiscale - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. ivanomatteo/laravel-codice-fiscale

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

ivanomatteo/laravel-codice-fiscale
==================================

Laravel validator for italian fiscal code

0.1.11(3y ago)337.8k↓15.3%2[1 issues](https://github.com/ivanomatteo/laravel-codice-fiscale/issues)MITPHPPHP ^7.2 | ^8.0CI failing

Since Jul 6Pushed 3y ago2 watchersCompare

[ Source](https://github.com/ivanomatteo/laravel-codice-fiscale)[ Packagist](https://packagist.org/packages/ivanomatteo/laravel-codice-fiscale)[ Docs](https://github.com/ivanomatteo/laravel-codice-fiscale)[ RSS](/packages/ivanomatteo-laravel-codice-fiscale/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (15)Used By (0)

Laravel Fiscal Code Validator
=============================

[](#laravel-fiscal-code-validator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ca020817ba54de96a28effe950586c0531e73d2bd493a495fb7239480722fd52/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6976616e6f6d617474656f2f6c61726176656c2d636f646963652d66697363616c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ivanomatteo/laravel-codice-fiscale)[![Total Downloads](https://camo.githubusercontent.com/cb6f16a41656d50518d9e6da43bef002af3dfe546d7cbc871287733774ce3804/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6976616e6f6d617474656f2f6c61726176656c2d636f646963652d66697363616c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ivanomatteo/laravel-codice-fiscale)

Laravel validator for italian fiscal code

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

[](#installation)

You can install the package via composer:

```
composer require ivanomatteo/laravel-codice-fiscale
```

Usage
-----

[](#usage)

publish lang

```
php artisan vendor:publish --provider "IvanoMatteo\LaravelCodiceFiscale\LaravelCodiceFiscaleServiceProvider"  --tag lang

php artisan vendor:publish --provider "IvanoMatteo\LaravelCodiceFiscale\LaravelCodiceFiscaleServiceProvider"  --tag config
```

```
/*
Fiscal code fields name:

    name
    familyName
    dateOfBirth
    sex
    cityCode

*/
$validated = Request::validate( [
    // first parameter: the field containing the fiscal code
    // second parameter: the corrisponding filed name for matching
    'dob' => 'required|codfisc:fiscalCode,dateOfBirth',
    'first_name' => 'required|codfisc:fiscalCode,name',
    'last_name' => 'required|codfisc:fiscalCode,familyName',

    //second parameter: can be omitted if the filed name is alredy correct
    'sex' => 'required|codfisc:fiscalCode',
    'cityCode' => 'required|codfisc:fiscalCode',
    'fiscalCode' => 'required|codfisc',
]);

$validated = Request::validate( [
    'first_name' => 'required',
    'last_name' => 'required',
    'dob' => 'required',
    'sex' => 'required',
    'cityCode' => 'required',

    // all rules on fiscal code
    'fiscalCode' => 'required|codfisc:first_name=name,last_name=familyName,dob=dateOfBirth,sex=sex,cityCode=cityCode',
]);

$validated = Request::validate( [
    // ...
    // just check the format
    'fiscalCode' => 'required|codfisc',
]);
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Ivano Matteo](https://github.com/ivanomatteo)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.4% 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 ~68 days

Recently: every ~15 days

Total

14

Last Release

1254d ago

PHP version history (2 changes)0.1.0PHP ^7.1

0.1.10PHP ^7.2 | ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/35255310?v=4)[Ivano Matteo](/maintainers/IvanoMatteo)[@ivanomatteo](https://github.com/ivanomatteo)

---

Top Contributors

[![ivanomatteo](https://avatars.githubusercontent.com/u/35255310?v=4)](https://github.com/ivanomatteo "ivanomatteo (19 commits)")[![michele-widesrl](https://avatars.githubusercontent.com/u/70145708?v=4)](https://github.com/michele-widesrl "michele-widesrl (3 commits)")

---

Tags

ivanomatteolaravel-codice-fiscale

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ivanomatteo-laravel-codice-fiscale/health.svg)

```
[![Health](https://phpackages.com/badges/ivanomatteo-laravel-codice-fiscale/health.svg)](https://phpackages.com/packages/ivanomatteo-laravel-codice-fiscale)
```

###  Alternatives

[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.0M60](/packages/spatie-laravel-honeypot)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)[illuminatech/validation-composite

Allows uniting several validation rules into a single one for easy re-usage

184485.5k](/packages/illuminatech-validation-composite)

PHPackages © 2026

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