PHP code example of vahidalvandi / validation
1. Go to this page and download the library: Download vahidalvandi/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/ */
vahidalvandi / validation example snippets php
Anetwork\Validation\PersianValidationServiceProvider::class
$input = [ 'فارسی' ];
$rules = [ 'persian_alpha' ];
Validator::make( $input, $rules );
$input = [ '۰۱۲۳۴۵۶۷۸۹' ];
$rules = [ 'persian_num' ];
Validator::make( $input, $rules );
$input = [ 'فارسی۱۲۳۴۵۶۷۸۹' ];
$rules = [ 'persian_alpha_num' ];
Validator::make( $input, $rules );
$input = [ '09381234567' ];
$rules = [ 'iran_mobile' ];
Validator::make( $input, $rules );
$input = [ 'IR062960000000100324200001' ];
$rules = [ 'sheba' ];
Validator::make( $input, $rules );
$input = [ '3240175800' ];
$rules = [ 'melli_code' ];
Validator::make( $input, $rules );
$input = [ '6274129005473742' ];
$rules = [ 'card_number' ];
Validator::make( $input, $rules );
$input = [ '167197-35744' ];
$rules = [ 'iran_postal_code' ];
Validator::make( $input, $rules );
$input = [ '16719735744' ];
$rules = [ 'iran_postal_code' ];
Validator::make( $input, $rules );