PHP code example of sadegh19b / laravel-persian-validation
1. Go to this page and download the library: Download sadegh19b/laravel-persian-validation 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/ */
sadegh19b / laravel-persian-validation example snippets
'field' => '
// Basic usage
$rules = [
'name' => ' 'code_melli' => 'uired', 'persian_date', 'persian_date_between:1370/01/01,1402/12/29'],
// First param for with area code, and second for area code separator.
// for example this valid value is 021-12345678
'phone' => ['
use Sadegh19b\LaravelPersianValidation\Rules\PersianAlpha;
use Sadegh19b\LaravelPersianValidation\Rules\IranianMobile;
use Sadegh19b\LaravelPersianValidation\Rules\IranianNationalId;
use Sadegh19b\LaravelPersianValidation\Rules\PersianDate;
// Basic usage
$rules = [
'name' => ['arator: '-')],
];