PHP code example of tavo1987 / laravel-ec-validator

1. Go to this page and download the library: Download tavo1987/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/ */

    

tavo1987 / laravel-ec-validator example snippets


'providers' => [
    Tavo\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',
    ]);