for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace KielD01\PhoneValidation\Providers;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider;
use KielD01\PhoneValidation\Enum\PhoneRegex;
use KielD01\PhoneValidation\Enum\PhoneRules;
class ValidationServiceProvider extends ServiceProvider
{
public function register()
Log::info(sprintf('%s has been registered', __CLASS__));
}
public function boot()
Validator::extend(
PhoneRules::WORLD,
static function ($attribute, $value) {
return preg_match(PhoneRegex::WORLD, $value);
);
PhoneRules::CIS,
return preg_match(PhoneRegex::CIS, $value);