CountryPhoneNumberValidator 0.1.3

CountryPhoneNumberValidator 0.1.3

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
 

  • By
  • moderateepheezy

CountryPhoneNumberValidator

CI Status
Version
License
Platform

Screenshot

Alt text

Usage

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.")
            }
        }
    }

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

CountryPhoneNumberValidator is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'CountryPhoneNumberValidator'

Todo

  1. Refactor PhoneNumberView for customization.
  2. Improve phone number validation.

Author

moderateepheezy, [email protected]

License

CountryPhoneNumberValidator is available under the MIT license. See the LICENSE file for more info.