{"id":21931756,"url":"https://github.com/lekoala/silverstripe-phonenumber","last_synced_at":"2025-10-30T05:08:30.457Z","repository":{"id":22354390,"uuid":"25690369","full_name":"lekoala/silverstripe-phonenumber","owner":"lekoala","description":"Provide some helper services to deal with phone numbers in SilverStripe","archived":false,"fork":false,"pushed_at":"2025-01-17T14:36:56.000Z","size":2189,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-04T04:54:33.584Z","etag":null,"topics":["phonenumber","silverstripe"],"latest_commit_sha":null,"homepage":"","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/lekoala.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"lekoala"}},"created_at":"2014-10-24T13:41:15.000Z","updated_at":"2025-01-17T14:36:57.000Z","dependencies_parsed_at":"2023-12-20T12:25:53.663Z","dependency_job_id":"7f62c23d-8001-4287-a104-8f9894519173","html_url":"https://github.com/lekoala/silverstripe-phonenumber","commit_stats":{"total_commits":27,"total_committers":4,"mean_commits":6.75,"dds":"0.40740740740740744","last_synced_commit":"a8d23770d44ceba307372416f6269b152d937ba8"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lekoala/silverstripe-phonenumber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lekoala%2Fsilverstripe-phonenumber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lekoala%2Fsilverstripe-phonenumber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lekoala%2Fsilverstripe-phonenumber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lekoala%2Fsilverstripe-phonenumber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lekoala","download_url":"https://codeload.github.com/lekoala/silverstripe-phonenumber/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lekoala%2Fsilverstripe-phonenumber/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281748716,"owners_count":26554822,"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","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["phonenumber","silverstripe"],"created_at":"2024-11-28T23:14:55.686Z","updated_at":"2025-10-30T05:08:30.431Z","avatar_url":"https://github.com/lekoala.png","language":"PHP","funding_links":["https://github.com/sponsors/lekoala"],"categories":[],"sub_categories":[],"readme":"# SilverStripe PhoneNumber module\n\n![Build Status](https://github.com/lekoala/silverstripe-phonenumber/actions/workflows/ci.yml/badge.svg)\n[![scrutinizer](https://scrutinizer-ci.com/g/lekoala/silverstripe-phonenumber/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/lekoala/silverstripe-phonenumber/)\n[![Code coverage](https://codecov.io/gh/lekoala/silverstripe-phonenumber/branch/master/graph/badge.svg)](https://codecov.io/gh/lekoala/silverstripe-phonenumber)\n\n## Intro\n\nProvide some helper services to deal with phone numbers in SilverStripe\n\nThis module integrates libphonenumber as the utility to parse and validate\nphonenumbers.\n\nMost of the time, it's a good idea to set the country of the phone number.\nOtherwise, current locale will be used.\n\nSample code:\n\n```php\n\t$phone = new PhoneField('phone', 'Phone number');\n\t$phone-\u003esetCountryField('CountryCode');\n\n\t$validator = ZenValidator::create();\n\t$validator-\u003esetConstraint('phone', Constraint_remote::create('/__phonenumber/validate',null,array('data' =\u003e array('country' =\u003e 'BE'))));\n```\n\nThis module also provide an extension to apply to dataobject, for example to members\n\n```yml\nSilverStripe\\Security\\Member:\n  extensions:\n    - LeKoala\\PhoneNumber\\PhoneNumberExtension\n```\n\n## Phone DBField\n\nYou can set your DataObject db field to Phone or DBPhone::class\n\nThis will automatically scaffold a CountryPhoneField which is a combo field with a country dropdown (with list of prefixes) and a space for the field itself\n\n## Form fields\n\nTwo available fields:\n\n-   PhoneField : a plain phone field that supports national and international numbers\n-   CountryPhoneField : a combo field with a country dropdown + national phone number\n\n## Ajax validation and formatting\n\nExpose ´**phonenumber/validate´ and ´**phonenumber/format´ endpoints for validation and formatting of phone numbers\n\n## Todo\n\nNone\n\n## Compatibility\n\nTested with 5.x but should work on any ^4|^5 projects\n\n## Maintainer\n\nLeKoala - thomas@lekoala.be\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flekoala%2Fsilverstripe-phonenumber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flekoala%2Fsilverstripe-phonenumber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flekoala%2Fsilverstripe-phonenumber/lists"}