{"id":13478659,"url":"https://github.com/stuyam/laravel-phone-validator","last_synced_at":"2025-04-12T20:32:48.633Z","repository":{"id":57060712,"uuid":"62191432","full_name":"stuyam/laravel-phone-validator","owner":"stuyam","description":"A phone validator for Laravel using the free Twilio phone lookup service.","archived":false,"fork":false,"pushed_at":"2023-04-01T19:00:27.000Z","size":24,"stargazers_count":28,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T06:08:27.134Z","etag":null,"topics":["laravel","packagist","php","twilio"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/stuyam/laravel-phone-validator","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stuyam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-06-29T03:07:22.000Z","updated_at":"2024-04-02T19:38:02.000Z","dependencies_parsed_at":"2024-01-14T08:48:39.463Z","dependency_job_id":"15524cb1-7728-4089-8bc9-c6ec768ed16d","html_url":"https://github.com/stuyam/laravel-phone-validator","commit_stats":{"total_commits":34,"total_committers":6,"mean_commits":5.666666666666667,"dds":"0.20588235294117652","last_synced_commit":"e01f15548b005545980da93f237179e1aa43421d"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuyam%2Flaravel-phone-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuyam%2Flaravel-phone-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuyam%2Flaravel-phone-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuyam%2Flaravel-phone-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stuyam","download_url":"https://codeload.github.com/stuyam/laravel-phone-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248630289,"owners_count":21136415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","packagist","php","twilio"],"created_at":"2024-07-31T16:02:00.086Z","updated_at":"2025-04-12T20:32:48.380Z","avatar_url":"https://github.com/stuyam.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Lavarel Phone Validator\n[![Packagist](https://img.shields.io/packagist/v/stuyam/laravel-phone-validator.svg)](https://packagist.org/packages/stuyam/laravel-phone-validator)\n[![Packagist](https://img.shields.io/packagist/dt/stuyam/laravel-phone-validator.svg)](https://packagist.org/packages/stuyam/laravel-phone-validator)\n\nA phone validator for Laravel using the FREE [Twilio phone lookup service](https://www.twilio.com/lookup)\n\nThis custom validator validates that a phone number actual exists. Not just if it has a specific format or not, but if the phone number is a real registered phone number. It is smart enough to handle formated numbers like ```(123)-555-1234``` and unfromated numbers like ```1235551234``` so users can enter in a phone number however they are most comfortable.\n\nFor a working example check out [Laravel Validator Example](https://github.com/stuyam/validators) project.\n\nAlso see: [Laravel Kickbox Validator](https://github.com/stuyam/laravel-kickbox-validator) for email address validation.\n\n### Step 1\nInstall via composer:\n\n```\ncomposer require stuyam/laravel-phone-validator\n```\n\n### Step 2\nAdd to your ```config/app.php``` service provider list:\n\n```php\nStuYam\\PhoneValidator\\PhoneValidatorServiceProvider::class\n```\n\n### Step 3\nAdd Twilio credentials to your .env file:\n\n(If you don't have a Twilio account you can go to [Twilio.com](https://www.twilio.com/) and make a free account)\n\n```\nTWILIO_SID=xxxxxxxx\nTWILIO_TOKEN=xxxxxxxx\n```\n\n\n### Usage\nAdd the string 'phone' to a form request rules or validator like so:\n\n```php\n\u003c?php\n\nnamespace App\\Http\\Requests;\n\nuse App\\Http\\Requests\\Request;\n\nclass PhoneFormRequest extends Request\n{\n    /**\n     * Determine if the user is authorized to make this request.\n     *\n     * @return bool\n     */\n    public function authorize()\n    {\n        return true;\n    }\n\n    /**\n     * Get the validation rules that apply to the request.\n     *\n     * @return array\n     */\n    public function rules()\n    {\n        return [\n        \t// this means the phone input will be validated that\n        \t// it is required and that it is an ACTUAL phone number\n            'phone' =\u003e 'required|phone'\n        ];\n    }\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuyam%2Flaravel-phone-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstuyam%2Flaravel-phone-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuyam%2Flaravel-phone-validator/lists"}