Skip to content

Commit 7271c66

Browse files
committed
Fix issue with validation
1 parent 029dfd0 commit 7271c66

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Example/KWVerificationCodeView/VerificationCodeViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class VerificationCodeViewController: UIViewController {
2121

2222
submitButton.isEnabled = false
2323
verificationCodeView.delegate = self
24-
24+
2525
/* Other available options
2626

2727
verificationCodeView.keyboardType = UIKeyboardType.emailAddress

KWVerificationCodeView.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'KWVerificationCodeView'
3-
s.version = '0.1.7'
3+
s.version = '0.1.8'
44
s.summary = 'A verification code view with validation.'
55
s.description = 'A customisable verification code view with built in validation. Can be used for one time passwords (OTPs), email verification codes etc.'
66
s.homepage = 'https://github.com/keepworks/kwverificationcodeview'

KWVerificationCodeView/Classes/KWVerificationCodeView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public protocol KWVerificationCodeViewDelegate: class {
159159

160160
public func hasValidCode() -> Bool {
161161
for textFieldView in textFieldViews {
162-
if textFieldView.numberTextField.text?.trim() == nil {
162+
if textFieldView.numberTextField.text!.trim() == "" {
163163
return false
164164
}
165165
}

0 commit comments

Comments
 (0)