andersonteala / validate-phone
Validate a phone number
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/andersonteala/validate-phone
Requires
- php: >=7.0
This package is auto-updated.
Last update: 2025-12-05 07:28:30 UTC
README
A simple phone validator, returning if the phone is mobile, landline or invalid. Valid only for Brazilian phones (first version).
Requirements
- PHP
- 7.0
- or higher required
Installing
To install this dependency just run the command below:
composer require andersonteala/validate-phone
Example Usage
For your use, follow the example below:
<?php require __DIR__ . '/vendor/autoload.php'; use AndersonTeala\ValidatePhone\ValidatePhone; $validator = new ValidatePhone(); $numberData = [ 'ddd' => '11', 'phone' => '920202020' ]; $type = $validator->validate($numberData);