PHP code example of pacerit / laravel-polish-validation-rules
1. Go to this page and download the library: Download pacerit/laravel-polish-validation-rules 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/ */
pacerit / laravel-polish-validation-rules example snippets
$validator = Validator::make(
$request->all(),
[
'post_code' => 'post_code',
'pesel' => 'PESEL',
'nip_number' => 'NIP',
]
);
$validator = Validator::make(
$request->all(),
[
'post_code' => 'post_code:without_dash',
'pesel' => 'PESEL:gender_female',
]
);
$validator = Validator::make(
$request->all(),
[
'pesel' => 'PESEL:gender_male:born_before,2022-01-01:born_after,2000-01-01',
]
);