From ed896f9e4a7c91c824fd472a41ff047499d4a2d5 Mon Sep 17 00:00:00 2001 From: George Kaimakas Date: Fri, 4 Dec 2015 14:03:51 +0200 Subject: [PATCH] added watch validation --- .idea/workspace.xml | 83 +++++++++++++++++++++------------ SwiftValidators.podspec | 2 +- SwiftValidators/Validator.swift | 4 +- 3 files changed, 57 insertions(+), 32 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index dad8602..2fbd1b0 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,12 +2,7 @@ - - - - - @@ -34,17 +29,17 @@ - + - + - - + + @@ -60,10 +55,10 @@ - + - + @@ -276,7 +271,13 @@ @@ -284,7 +285,7 @@ - + @@ -331,6 +332,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -457,43 +482,43 @@ - + - + - + - - + + + + + + + + - + - + - + - - + + - - - - - - \ No newline at end of file diff --git a/SwiftValidators.podspec b/SwiftValidators.podspec index 3006141..8a1b0a1 100644 --- a/SwiftValidators.podspec +++ b/SwiftValidators.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "SwiftValidators" - s.version = "2.0.3" + s.version = "2.0.4" s.summary = "String validation for iOS developed in Swift. Inspired by validator.js" s.homepage = "https://github.com/gkaimakas/SwiftValidators" s.license = 'MIT' diff --git a/SwiftValidators/Validator.swift b/SwiftValidators/Validator.swift index 739a53a..b0b9ae8 100644 --- a/SwiftValidators/Validator.swift +++ b/SwiftValidators/Validator.swift @@ -11,7 +11,7 @@ import Foundation public typealias Validation = (String) -> Bool public protocol ValidatorProtocol { - func value() -> String + func getValue() -> String } public class Validator { @@ -1186,7 +1186,7 @@ public class Validator { if value == "" { return (self.validationMode == .Default ? true : false) } - return value == delegate.value() + return value == delegate.getValue() } }