PHP code example of davidianbonner / cli-phone-number-validator
1. Go to this page and download the library: Download davidianbonner/cli-phone-number-validator 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/ */
davidianbonner / cli-phone-number-validator example snippets
namespace App\Commands;
class ValidateESFixedLineCommand extends BaseValidatorCommand
{
protected $signature = 'validate:es-fixedline
{source* : A list of numbers or files to validate against}
{--file : Specifies that the source is a list of files}
{--output= : Specifies that the output path}';
protected $description = 'Validate Spanish fixed line numbers and ouput to a CSV';
public function makeValidatorForNumer($number): PhoneNumberValidator
{
// The country code is only
bash
$ php number-validator app:build number-validator
bash
$ php number-validator validate:uk-mobile "07712345678" "07712341234" "07283 123 32"
bash
$ php number-validator validate:uk-mobile ./path/to/file --file