From 5abb05a4230bc4ea3c3efc51c4d5b93a13bb981f Mon Sep 17 00:00:00 2001 From: Deniz Adalar Date: Fri, 3 Jun 2016 16:42:55 +0300 Subject: [PATCH] 4.0.0 podspec and readme update --- README.md | 8 +++++--- SwiftValidator.podspec | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a4eb97f..7541922 100644 --- a/README.md +++ b/README.md @@ -102,11 +102,13 @@ func validationSuccessful() { // submit the form } -func validationFailed(errors:[UITextField:ValidationError]) { +func validationFailed(errors:[(Validatable ,ValidationError]) { // turn the fields to red for (field, error) in validator.errors { - field.layer.borderColor = UIColor.redColor().CGColor - field.layer.borderWidth = 1.0 + if let field = field as? UITextField { + field.layer.borderColor = UIColor.redColor().CGColor + field.layer.borderWidth = 1.0 + } error.errorLabel?.text = error.errorMessage // works if you added labels error.errorLabel?.hidden = false } diff --git a/SwiftValidator.podspec b/SwiftValidator.podspec index 4e31e32..5a15ee4 100644 --- a/SwiftValidator.podspec +++ b/SwiftValidator.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "SwiftValidator" - s.version = "3.0.1" + s.version = "4.0.0" s.summary = "A UITextField Validation library for Swift" s.homepage = "https://github.com/jpotts18/SwiftValidator" s.screenshots = "https://raw.githubusercontent.com/jpotts18/SwiftValidator/master/swift-validator-v2.gif" @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.social_media_url = "http://twitter.com/jpotts18" s.platform = :ios s.ios.deployment_target = '8.0' - s.source = { :git => "https://github.com/jpotts18/SwiftValidator.git", :tag => "3.0.1" } + s.source = { :git => "https://github.com/jpotts18/SwiftValidator.git", :tag => "4.0.0" } s.source_files = "SwiftValidator/**/*.swift" s.exclude_files = "Validator/AppDelegate.swift" s.frameworks = ['Foundation', 'UIKit']