PHP code example of lloaldo / laravel-validate-spa
1. Go to this page and download the library: Download lloaldo/laravel-validate-spa 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/ */
lloaldo / laravel-validate-spa example snippets
'providers' => [
// Other providers...
Lloaldo\LaravelValidateSpa\ValidationServiceProvider::class,
],
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreWorkerRequest extends FormRequest
{
public function rules()
{
return [
'personal_id' => '
}
// resources/lang/vendor/laravel-validate-spa/es/validation.php
return [
'spanish_nif' => 'El :attribute no es un NIF válido.',
'spanish_nie' => 'El :attribute no es un NIE válido.',
'spanish_cif' => 'El :attribute no es un CIF válido.',
'spanish_ssn' => 'El :attribute no es un Número de la Seguridad Social válido.',
'spanish_iban' => 'El :attribute no es un IBAN español válido.',
'spanish_postal_code' => 'El :attribute no es un código postal español válido.',
'spanish_phone' => 'El :attribute no es un número de teléfono español válido.',
'spanish_license_plate' => 'El :attribute no es una matrícula española válida.',
'spanish_ccc' => 'El :attribute no es un CCC español válido.',
'spanish_passport' => 'El :attribute es un pasaporte español válido.',
];