Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moderateepheezy/countryphonenumbervalidator
https://github.com/moderateepheezy/countryphonenumbervalidator
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/moderateepheezy/countryphonenumbervalidator
- Owner: moderateepheezy
- License: mit
- Created: 2017-12-05T17:50:34.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-27T13:57:12.000Z (over 6 years ago)
- Last Synced: 2024-10-31T16:13:16.557Z (16 days ago)
- Language: Swift
- Size: 6.2 MB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CountryPhoneNumberValidator
[![CI Status](http://img.shields.io/travis/moderateepheezy/CountryPhoneNumberValidator.svg?style=flat)](https://travis-ci.org/moderateepheezy/CountryPhoneNumberValidator)
[![Version](https://img.shields.io/cocoapods/v/CountryPhoneNumberValidator.svg?style=flat)](http://cocoapods.org/pods/CountryPhoneNumberValidator)
[![License](https://img.shields.io/cocoapods/l/CountryPhoneNumberValidator.svg?style=flat)](http://cocoapods.org/pods/CountryPhoneNumberValidator)
[![Platform](https://img.shields.io/cocoapods/p/CountryPhoneNumberValidator.svg?style=flat)](http://cocoapods.org/pods/CountryPhoneNumberValidator)## Screenshot
![Alt text](https://user-images.githubusercontent.com/4386218/33623765-5e8e72d6-d9f2-11e7-851b-f0275fd1d4e1.gif "Main Screen")## Usage
```
import CountryPhoneNumberValidatorvar phoneView: PhoneNumberView!
phoneView = PhoneNumberView(vc: self, button: verifyButton)
verifyButton.addTarget(self, action: #selector(verifyPhoneNumber), for: .touchUpInside)
func verifyPhoneNumber() {
phoneView.validate { (completed) in
if completed {
self.showAlert(withTitle: "Success", message: "PhoneNumber is Valid")
}else{
self.showAlert(withTitle: "", message: "The phone number is not valid.")
}
}
}
```## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
## Installation
Copy *CountryPhoneNumberValidator* to your project folder
## Todo
1. Refactor PhoneNumberView for customization.
2. Improve phone number validation.
3. Make installing from cocoapod.## Author
moderateepheezy, [email protected]
## License
CountryPhoneNumberValidator is available under the MIT license. See the LICENSE file for more info.