Skip to content

Commit

Permalink
removed deprecated characters property
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Gushchin authored and Evgeny Gushchin committed Nov 21, 2017
1 parent 8577ab7 commit 52012e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/UITextField+maxLength.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extension UITextField {
- Parameter textField: A textfield beeing edited
*/
@objc func limitLength(textField: UITextField) {
guard let prospectiveText = textField.text, prospectiveText.characters.count > maxLength else {
guard let prospectiveText = textField.text, prospectiveText.count > maxLength else {
return
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/ValidatorViewController+Minlength.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extension ValidatorViewController {
private func MinlengthValidator(value: Any?, params: [Any?]) -> Bool {
let minLength = params[0] as! Int

if let stringValue = value as? String, (stringValue.characters.count == 0 || stringValue.characters.count >= minLength) {
if let stringValue = value as? String, (stringValue.count == 0 || stringValue.count >= minLength) {
return true
}

Expand Down

0 comments on commit 52012e9

Please sign in to comment.