CountryPhoneNumberValidator 0.1.3

CountryPhoneNumberValidator 0.1.3

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2017年12月
SwiftSwift 版本4.0
SPM支持 SPM

维护者:Afees Lawal.



 
依赖关系
PhoneNumberKit~> 2.0
libPhoneNumber-iOS~> 0.8
 

  • moderateepheezy

CountryPhoneNumberValidator

CI Status
Version
License
Platform

屏幕截图

Alt text

用法

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 目录中运行 pod install

要求

安装

CountryPhoneNumberValidator 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile 中

pod 'CountryPhoneNumberValidator'

待办事项

  1. 重构 PhoneNumberView 以支持自定义。
  2. 改进电话号码验证。

作者

moderateepheezy, [email protected]

许可证

CountryPhoneNumberValidator 在 MIT 许可证下提供。有关更多信息,请参阅 LICENSE 文件。