Latest 0.1.3
Homepage https://github.com/moderateepheezy/CountryPhoneNumberValidator
License MIT
Platforms ios 9.3
Dependencies PhoneNumberKit, libPhoneNumber-iOS
Frameworks UIKit
Authors

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', :git => 'https://github.com/moderateepheezy/CountryPhoneNumberValidator', :branch => 'master'

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.

Latest podspec

{
    "name": "CountryPhoneNumberValidator",
    "version": "0.1.3",
    "summary": "A phone number validator based on Country dial code",
    "description": "The library provides a view for inputing phone number with dial code, returns a country flag andn   validate if the dial code is valid for bthe phone number inputed nTODO: Add long description of the pod here.",
    "homepage": "https://github.com/moderateepheezy/CountryPhoneNumberValidator",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "moderateepheezy": "[email protected]"
    },
    "source": {
        "git": "https://github.com/moderateepheezy/CountryPhoneNumberValidator.git",
        "branch": "master",
        "tag": "0.1.3"
    },
    "platforms": {
        "ios": "9.3"
    },
    "source_files": "CountryPhoneNumberValidator/Classes/**/*",
    "frameworks": "UIKit",
    "dependencies": {
        "PhoneNumberKit": [
            "~> 2.0"
        ],
        "libPhoneNumber-iOS": [
            "~> 0.8"
        ]
    },
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This