<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jekk0 / laravel-iso3166-validation-rules example snippets
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Jekk0\Laravel\Iso3166\Validation\Rules\Iso3166Alpha2;
class Test extends Controller
{
public function index(Request $request)
{
// Request example: http://127.0.0.1:8000/t?country=us
$rules = ['country' => ['
use Jekk0\Laravel\Iso3166\Validation\Rules\Iso3166Alpha2;
use Jekk0\Laravel\Iso3166\Validation\Rules\Iso3166Alpha3;
use Jekk0\Laravel\Iso3166\Validation\Rules\Iso3166Numeric;
$rules = ['countryAlpha2' => ['
...
public function index(Request $request)
{
// Request example: http://127.0.0.1:8000/t?country=INVALID_INPUT
$iso3166Alpha2Rule = (new Iso3166Alpha2())->setErrorMessage('New Custom Error Message :attribute = :input');
$rules = ['country' => [' code is invalid: New Custom Error Message country = INVALID_INPUT
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.