PHP code example of empregoligado / brazilian-phone-validator
1. Go to this page and download the library: Download empregoligado/brazilian-phone-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/ */
empregoligado / brazilian-phone-validator example snippets
dator = new EmpregoLigado\BrazilianPhoneValidator\Validator();
$validator = new EmpregoLigado\BrazilianPhoneValidator\Validator();
$phone = '6134111200';
// Checks if it is a valid Brazilian phone number.
if ($validator->isValid($phone)) {
// success statement
} else {
// error statement
}