PHPackages                             jeandepaula/country-validations - 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. jeandepaula/country-validations

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

jeandepaula/country-validations
===============================

A PHP library for validating personal, corporate, banking, and vehicle data for Brazil, USA, and Canada.

v1.1.1(1y ago)1122MITPHPPHP ^7.4 || ^8.0

Since Jan 5Pushed 1y ago2 watchersCompare

[ Source](https://github.com/JeandePaula/country-validations)[ Packagist](https://packagist.org/packages/jeandepaula/country-validations)[ RSS](/packages/jeandepaula-country-validations/feed)WikiDiscussions main Synced 1mo ago

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

Country Validations Library
===========================

[](#country-validations-library)

The **Country Validations Library** is a powerful PHP package designed to validate various data formats for Brazil, Canada, and the USA. The library provides easy-to-use methods for personal, corporate, banking, and vehicle data validation.

---

Features
--------

[](#features)

### Supported Countries

[](#supported-countries)

- **Brazil**: Validates CPF, CNPJ, phone numbers, bank account details, vehicle plates, and more.
- **Canada**: Validates SIN, phone numbers, and driver's licenses.
- **USA**: Validates SSN, phone numbers, passports, and driver's licenses.

### Key Functionalities

[](#key-functionalities)

- Personal data validation (e.g., CPF, SIN, SSN, email, name).
- Banking data validation (e.g., IBAN, SWIFT, bank codes).
- Vehicle data validation (e.g., plates, VIN, RENAVAM).
- Corporate data validation (e.g., CNPJ, state registration, NIRE).
- Easy configuration and modular structure.

---

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

[](#installation)

### Using Composer

[](#using-composer)

```
composer require jeandepaula/country-validations
```

### Requirements

[](#requirements)

- PHP 7.4 or higher
- Composer

---

Integration with Laravel
------------------------

[](#integration-with-laravel)

### Service Provider Registration (Optional)

[](#service-provider-registration-optional)

If needed, you can create a service provider to encapsulate the library.

1. **Create a Service Provider**

    ```
    php artisan make:provider CountryValidationsServiceProvider
    ```
2. **Register the Library in the Provider**In the generated `CountryValidationsServiceProvider`:

    ```
