TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Dec 2017 |
SwiftSwift Version | 4.0 |
SPMSupports SPM | ✗ |
Maintained by Afees Lawal.
Depends on: | |
PhoneNumberKit | ~> 2.0 |
libPhoneNumber-iOS | ~> 0.8 |
import CountryPhoneNumberValidator
var 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.")
}
}
}
To run the example project, clone the repo, and run pod install
from the Example directory first.
CountryPhoneNumberValidator is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'CountryPhoneNumberValidator'
moderateepheezy, [email protected]
CountryPhoneNumberValidator is available under the MIT license. See the LICENSE file for more info.