PHP code example of seeds-std / laravel-jp-validation-rules
1. Go to this page and download the library: Download seeds-std/laravel-jp-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/ */
seeds-std / laravel-jp-validation-rules example snippets
Validator::make(['name' => 'やまだたろう'], ['name' => new \SeedsStd\JpValidationRules\Hiragana()])
->passes(); // true
Validator::make(['name' => 'ヤマダタロウ'], ['name' => new \SeedsStd\JpValidationRules\ZenkakuKatakana()])
->passes(); // true
Validator::make(['name' => 'ヤマダタロウ'], ['name' => new \SeedsStd\JpValidationRules\HankakuKatakana()])
->passes(); // true
Validator::make(['phone_number' => '0120123456'], ['phone_number' => new \SeedsStd\JpValidationRules\PhoneNumber()])
->passes(); // true