PHP code example of glima / phone-validate-br
1. Go to this page and download the library: Download glima/phone-validate-br 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/ */
glima / phone-validate-br example snippets
Glima\PhoneValidateBr\PhoneValidatorBR;
$phone = "+55(11) 91234-56455622";
$phoneValidator = PhoneValidatorBR::validate($phone);
echo "O telefone é válido? " . $phoneValidator->isValid; //false
echo "O telefone é: " . $phoneValidator->phone; //null
echo "Analise da validação: " . $phoneValidator->message; //O telefone não é válido!