PHPackages                             luilliarcec/laravel-ecuador-identification - 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. [Payment Processing](/categories/payments)
4. /
5. luilliarcec/laravel-ecuador-identification

ActiveLibrary[Payment Processing](/categories/payments)

luilliarcec/laravel-ecuador-identification
==========================================

Validations for Laravel for identifications of people and companies of Ecuador, an important requirement for electronic invoicing.

3.0.0(4y ago)61.0k2[1 PRs](https://github.com/luilliarcec/laravel-ecuador-identification/pulls)MITPHPPHP ^8.0CI failing

Since Feb 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/luilliarcec/laravel-ecuador-identification)[ Packagist](https://packagist.org/packages/luilliarcec/laravel-ecuador-identification)[ Docs](https://github.com/luilliarcec/laravel-ecuador-identification)[ RSS](/packages/luilliarcec-laravel-ecuador-identification/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (11)Used By (0)

Laravel Ecuador Identification
==============================

[](#laravel-ecuador-identification)

[![Run Tests](https://github.com/luilliarcec/laravel-ecuador-identification/workflows/Run%20Tests/badge.svg?branch=master)](https://github.com/luilliarcec/laravel-ecuador-identification/workflows/Run%20Tests/badge.svg?branch=master)[![Latest Version on Packagist](https://camo.githubusercontent.com/90e0d11aebc5b395e0c24e0bec84ff7f0862f41cc785f41373b42f1e3dbfd558/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c75696c6c6961726365632f6c61726176656c2d65637561646f722d6964656e74696669636174696f6e2e737667)](https://packagist.org/packages/luilliarcec/laravel-ecuador-identification)[![Quality Score](https://camo.githubusercontent.com/a0819f079e7cf0c8277e032df1075d4b26995fef11fbca74766da77fc427dcdb/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c75696c6c6961726365632f6c61726176656c2d65637561646f722d6964656e74696669636174696f6e)](https://scrutinizer-ci.com/g/luilliarcec/laravel-ecuador-identification)[![Total Downloads](https://camo.githubusercontent.com/5cd74766a770084a649bb3c8d7caad967d810f944502a45052ff515f1e89e156/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c75696c6c6961726365632f6c61726176656c2d65637561646f722d6964656e74696669636174696f6e)](https://packagist.org/packages/luilliarcec/laravel-ecuador-identification)[![GitHub license](https://camo.githubusercontent.com/1ecc04ca4434155d71d566e76fb0744c1cfa24351ab6056d96b6c35aec531f87/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c75696c6c6961726365632f6c61726176656c2d65637561646f722d6964656e74696669636174696f6e2e737667)](https://github.com/luilliarcec/laravel-ecuador-identification/blob/master/LICENSE.md)

Laravel Ecuador Identification is a validation library for Laravel, which allows the validation of personal and business identification documents, according to the country's tax regulations.

It is fully adaptable to Laravel's Facade and Validator Class. Its use is also shown in a Facade identified with the name of the country. You can use it as follows.

```
$request->validate([
    'identification' => 'ecuador:natural_ruc',
]);
```

Or with Validator Facade

```
$validator = Validator::make($request->all(), [
    'identification' => 'ecuador:natural_ruc',
]);
```

Or with Ecuador Facade

```
use Luilliarcec\LaravelEcuadorIdentification\Facades\EcuadorIdentification;

EcuadorIdentification::validateNaturalRuc('1710034065001'); // Return null or string code
```

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

[](#installation)

You can install the package via composer:

```
composer require luilliarcec/laravel-ecuador-identification
```

Usage
-----

[](#usage)

When using the Laravel validator, each of them can be accessed by simply calling the validations by placing the \[rule\_name\]:\[validation\_name\].

### Ecuador (ecuador)

[](#ecuador-ecuador)

For ecuador use the "ecuador" rule

Ecuador has 5 types of documents, identification person or identity card, ruc of natural persons, ruc of private companies and ruc of public companies, in addition to billing the fictitious document of final consumer is used.

Validation rules:

- [Final Customer](#rule-final_customer)
- [Personal Identification](#rule-personal_identification)
- [Natural Ruc](#rule-natural_ruc)
- [Private Ruc](#rule-private_ruc)
- [Public Ruc](#rule-public_ruc)
- [Ruc](#rule-ruc)
- [Is Juridical Person](#rule-is_juridical_person)
- [Is Natural Person](#rule-is_natural_person)
- [All Identifications](#rule-all_identifications)

#### final\_customer

[](#final_customer)

Validate the final consumer document, this validation on the Facade returns your billing code

#### personal\_identification

[](#personal_identification)

Validate the Ecuadorian identification card, this validation on the Facade returns your billing code

#### natural\_ruc

[](#natural_ruc)

Validates the Ecuadorian RUC of Natural Person, this validation on the Facade returns your billing code

#### private\_ruc

[](#private_ruc)

Validates the Ecuadorian RUC of Private Companies, this validation on the Facade returns your billing code

#### public\_ruc

[](#public_ruc)

Validates the Ecuadorian RUC of Public Companies, this validation on the Facade returns your billing code

#### ruc

[](#ruc)

Validates the Ecuadorian RUC Companies (Public, Natural and Private), this validation on the Facade returns your billing code

#### is\_juridical\_person

[](#is_juridical_person)

The group called juridical persons are those that have an private ruc or a public ruc such validation on the Facade will return the billing code if the person has one of these documents, otherwise null.

#### is\_natural\_person

[](#is_natural_person)

The group called natural persons are those that have an Ecuadorian identity card or a natural ruc such validation on the Facade will return the billing code if the person has one of these documents, otherwise null.

#### all\_identifications

[](#all_identifications)

Validate the number with all types of documents. It includes the validation of final consumer. This validation in the Facade returns the corresponding billing code, if it fails, it returns null.

### Example

[](#example)

#### Validator

[](#validator)

Validations return true or false following the laravel validation convention.

```
$request->validate([
    'identification' => 'ecuador:personal_identification',
]);
```

#### Facade

[](#facade)

Facades return null if the document number does not match any type, otherwise they return the billing code.

```
use Luilliarcec\LaravelEcuadorIdentification\Facades\EcuadorIdentification;

EcuadorIdentification::validateAllTypeIdentification('9999999999999'); // Return '07' => Final Consumer
```

Translations
------------

[](#translations)

If you like to use the translation system of Laravel to present the messages or attributes. Access the corresponding files located in the `resources\lang\{language_code}\validation` folder.

##### Example

[](#example-1)

`resources\lang\en\validation:`

```

    return [
        ...

        'ecuador' => 'The :attribute field does not have the corresponding country format. (Ecuador)',

        /*
        |--------------------------------------------------------------------------
        | Custom Validation Attributes
        |--------------------------------------------------------------------------
        |
        | The following language lines are used to swap our attribute placeholder
        | with something more reader friendly such as "E-Mail Address" instead
        | of "email". This simply helps us make our message more expressive.
        |
        */

        'attributes' => [
            'id' => 'Ecuadorian Identification',
        ],
    ];
```

`resources\lang\es\validation:`

```

    return [
        ...

        'ecuador' => 'El campo :attribute no tiene el formato de país correspondiente. (Ecuador)',

        /*
        |--------------------------------------------------------------------------
        | Custom Validation Attributes
        |--------------------------------------------------------------------------
        |
        | The following language lines are used to swap our attribute placeholder
        | with something more reader friendly such as "E-Mail Address" instead
        | of "email". This simply helps us make our message more expressive.
        |
        */

        'attributes' => [
            'id' => 'Identificación Ecuatoriana',
        ],
    ];
```

### 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)

- [Luis Andrés Arce C.](https://github.com/luilliarcec)
- [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

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 98.8% 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 ~96 days

Recently: every ~145 days

Total

10

Last Release

1467d ago

Major Versions

1.1.5 → 2.0.02021-04-18

2.0.0 → 3.0.02022-06-21

PHP version history (3 changes)1.0.0PHP ^7.2

1.1.4PHP ^7.2|^8.0

3.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a739133b1773f13548e74e67db0ca26e16676c94269df44e4062da0fb28efc36?d=identicon)[luilliarcec](/maintainers/luilliarcec)

---

Top Contributors

[![luilliarcec](https://avatars.githubusercontent.com/u/27895611?v=4)](https://github.com/luilliarcec "luilliarcec (82 commits)")[![ajmariduena](https://avatars.githubusercontent.com/u/31521624?v=4)](https://github.com/ajmariduena "ajmariduena (1 commits)")

---

Tags

ecuadoridentification-personlaravel-ecuador-identificationphp8rule-rucsrilaravelinvoiceruccedulaecuadorfacturaluilliarceclaravel-ecuador-identification

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/luilliarcec-laravel-ecuador-identification/health.svg)

```
[![Health](https://phpackages.com/badges/luilliarcec-laravel-ecuador-identification/health.svg)](https://phpackages.com/packages/luilliarcec-laravel-ecuador-identification)
```

###  Alternatives

[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21313.7k3](/packages/ecotone-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3310.1k](/packages/duncanmcclean-statamic-cargo)[zoparga/laravel-szamlazzhu

Szamlazz.hu integration for Laravel

1224.3k1](/packages/zoparga-laravel-szamlazzhu)

PHPackages © 2026

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