要运行示例项目,请克隆仓库,并首先从 Example 目录中运行 pod install
。
NLBirthDateValidator 可通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile 中
pod "NLBirthDateValidator"
要使用它,请实现以下代码。
let result = NLBirthDateValidator.checkBirthDate(13, month: 09, year: 1986, minimumAge: 16)
结果将可能是 .DateValid、.DateInvalid 或 .AgeUnderMinimum。
Kale, [email protected]
NLBirthDateValidator 可在 MIT 许可下使用。有关更多信息,请参阅 LICENSE 文件。