Merge pull request #122 from dadalar/master
4.0.0 podspec and readme update
This commit is contained in:
commit
8f224aba83
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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']
|
||||
|
|
|
|||
Loading…
Reference in New Issue