Download the PHP package luilliarcec/laravel-ecuador-identification without Composer
On this page you can find all versions of the php package luilliarcec/laravel-ecuador-identification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download luilliarcec/laravel-ecuador-identification
More information about luilliarcec/laravel-ecuador-identification
Files in luilliarcec/laravel-ecuador-identification
Package laravel-ecuador-identification
Short Description Validations for Laravel for identifications of people and companies of Ecuador, an important requirement for electronic invoicing.
License MIT
Homepage https://github.com/luilliarcec/laravel-ecuador-identification
Informations about the package laravel-ecuador-identification
Laravel Ecuador Identification
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.
Or with Validator Facade
Or with Ecuador Facade
Installation
You can install the package via composer:
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)
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
- Personal Identification
- Natural Ruc
- Private Ruc
- Public Ruc
- Ruc
- Is Juridical Person
- Is Natural Person
- All Identifications
final_customer
Validate the final consumer document, this validation on the Facade returns your billing code
personal_identification
Validate the Ecuadorian identification card, this validation on the Facade returns your billing code
natural_ruc
Validates the Ecuadorian RUC of Natural Person, this validation on the Facade returns your billing code
private_ruc
Validates the Ecuadorian RUC of Private Companies, this validation on the Facade returns your billing code
public_ruc
Validates the Ecuadorian RUC of Public Companies, this validation on the Facade returns your billing code
ruc
Validates the Ecuadorian RUC Companies (Public, Natural and Private), this validation on the Facade returns your billing code
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
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
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
Validator
Validations return true or false following the laravel validation convention.
Facade
Facades return null if the document number does not match any type, otherwise they return the billing code.
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
resources\lang\en\validation:
resources\lang\es\validation:
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Luis Andrés Arce C.
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.