Download the PHP package orumad/laravel-spanish-validator without Composer
On this page you can find all versions of the php package orumad/laravel-spanish-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download orumad/laravel-spanish-validator
More information about orumad/laravel-spanish-validator
Files in orumad/laravel-spanish-validator
Package laravel-spanish-validator
Short Description Laravel validator for spanish stuff: NIF, NIE, CIF, NSS, IBAN, Postal Code, Phone numbers
License MIT
Homepage https://github.com/orumad/laravel-spanish-validator
Informations about the package laravel-spanish-validator
Laravel validator for spanish stuff: NIF, NIE, CIF, NSS, IBAN, Postal Code, Phone numbers
This package is a set of diferent validation rules for spanish national id numbers like:
- NIF: "Número de Identificación Fiscal" (tax number for individuals).
- NIE: "Número de Idenfiticación para Extranjeros" (identity number for foreigners).
- CIF: "Código de Identificación Fiscal" (tax number for companies).
- NSS: "Número de la Seguridad Social" (national security number).
Also the package include validators for:
- IBAN: International Bank Account Number.
- Postal codes: Spanish postal codes.
- Phone number: Spanish phone numbers format.
Instalation
The package can be installed via composer:
The package will automatically register itself.
If you want to edit the validation messages, you should run the following command to publish the translation files into your resources/lang
folder:
Available rules
nif
nie
cif
spanish_tax_number
spanish_personal_id
nss
iban
spanish_postal_code
spanish_phone
nif
Determine if the input is a valid "Número de Identificación Fiscal" (tax number for individuals).
nie
Determine if the field under validation is a valid "Número de Idenfiticación para Extranjeros" (identity number for foreigners).
cif
This rule will validate if the input field is a valid "Código de Identificación Fiscal" (tax number for companies).
spanish_tax_number
This rule validates if the input is a valid spanish tax number: NIF or NIE or CIF.
spanish_personal_id
Will validate if the input is a valid personal id number in Spain (NIF or NIE).
nss
Determine if the field under validation is a valid "Número de la Seguridad Social"_ (national security number).
iban
Test if the input field is a valid IBAN bank account number. (This uses the package globalcitizen/php-iban
to check the validity of IBAN)
spanish_postal_code
Will check if the postal code is a valid spanish postal code.
spanish_phone
This tule validates if the input field content is a valid spanish phone number format.
Testing
Changelog
Please see CHANGELOG for more information on 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.
License
The MIT License (MIT). Please see License File for more information.