PHP code example of gajosu / laravel-ec-validator

1. Go to this page and download the library: Download gajosu/laravel-ec-validator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gajosu / laravel-ec-validator example snippets


'providers' => [
    Gajosu\EcLaravelValidator\EcValidatorServiceProvider::class,
];

    //valida Cédula
    $this->validate($request, [
        'cedula' => 'ecuador:ci',
    ]);

    //valida Ruc persona Natural
    $this->validate($request, [
        'ruc' => 'ecuador:ruc',
    ]);

    //valida Ruc Sociedad Pública
    $this->validate($request, [
        'ruc' => 'ecuador:ruc_spub',
    ]);

    //valida Ruc Sociedad Privada
    $this->validate($request, [
        'ruc' => 'ecuador:ruc_spriv',
    ]);