From 8dafa0f02f3d1dc1fd605af1fa6b37f6197295b7 Mon Sep 17 00:00:00 2001 From: alejandro soto Date: Mon, 30 Mar 2015 20:13:06 -0600 Subject: [PATCH] more public access modifiers --- Swift_Validator.podspec | 4 ++-- Validator/Validator.swift | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Swift_Validator.podspec b/Swift_Validator.podspec index 7c7fd6e..ccf7674 100644 --- a/Swift_Validator.podspec +++ b/Swift_Validator.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Swift_Validator" - s.version = "2.0.2" + s.version = "2.0.3" s.summary = "A UITextField Validation library for Swift" s.homepage = "https://github.com/jpotts18/swift-validator" s.screenshots = "https://raw.githubusercontent.com/jpotts18/swift-validator/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/asotog/swift-validator.git", :tag => "2.0.2" } + s.source = { :git => "https://github.com/asotog/swift-validator.git", :tag => "2.0.3" } s.source_files = "Validator/*.swift" s.frameworks = ['Foundation', 'UIKit'] s.requires_arc = true diff --git a/Validator/Validator.swift b/Validator/Validator.swift index f55f553..0a703e7 100644 --- a/Validator/Validator.swift +++ b/Validator/Validator.swift @@ -16,22 +16,22 @@ import UIKit public class Validator { // dictionary to handle complex view hierarchies like dynamic tableview cells - var errors:[UITextField:ValidationError] = [:] + public var errors:[UITextField:ValidationError] = [:] var validations:[UITextField:ValidationRule] = [:] public init(){} // MARK: Using Keys - func registerField(textField:UITextField, rules:[Rule]) { + public func registerField(textField:UITextField, rules:[Rule]) { validations[textField] = ValidationRule(textField: textField, rules: rules, errorLabel: nil) } - func registerField(textField:UITextField, errorLabel:UILabel, rules:[Rule]) { + public func registerField(textField:UITextField, errorLabel:UILabel, rules:[Rule]) { validations[textField] = ValidationRule(textField: textField, rules:rules, errorLabel:errorLabel) } - func validateAll(delegate:ValidationDelegate) { + public func validateAll(delegate:ValidationDelegate) { for field in validations.keys { if let currentRule:ValidationRule = validations[field] {