Skip to content

Commit 2c4ffda

Browse files
author
alejandro soto
committed
Merge remote-tracking branch 'upstream/master'
Conflicts: Swift_Validator.podspec Validator/EmailRule.swift Validator/PasswordRule.swift Validator/ZipCodeRule.swift
2 parents b216f7b + b949078 commit 2c4ffda

File tree

9 files changed

+38
-187
lines changed

9 files changed

+38
-187
lines changed

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Xcode
2+
#
3+
build/
4+
*.pbxuser
5+
!default.pbxuser
6+
*.mode1v3
7+
!default.mode1v3
8+
*.mode2v3
9+
!default.mode2v3
10+
*.perspectivev3
11+
!default.perspectivev3
12+
xcuserdata
13+
*.xccheckout
14+
*.moved-aside
15+
DerivedData
16+
*.hmap
17+
*.ipa
18+
*.xcuserstate
19+
20+
# CocoaPods
21+
#
22+
# We recommend against adding the Pods directory to your .gitignore. However
23+
# you should judge for yourself, the pros and cons are mentioned at:
24+
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
25+
#
26+
# Pods/
27+
28+
# Carthage
29+
#
30+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
31+
# Carthage/Checkouts
32+
33+
Carthage/Build

Validator.xcodeproj/project.xcworkspace/xcshareddata/Validator.xccheckout

Lines changed: 0 additions & 41 deletions
This file was deleted.

Validator.xcodeproj/xcuserdata/jpotts18.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 0 additions & 5 deletions
This file was deleted.

Validator.xcodeproj/xcuserdata/jpotts18.xcuserdatad/xcschemes/Validator.xcscheme

Lines changed: 0 additions & 110 deletions
This file was deleted.

Validator.xcodeproj/xcuserdata/jpotts18.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 0 additions & 27 deletions
This file was deleted.

Validator/EmailRule.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010

1111
public class EmailRule: Rule {
1212

13-
var REGEX : String
13+
private let REGEX: String
1414

1515
public init(){
1616
self.REGEX = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}"
@@ -19,7 +19,7 @@ public class EmailRule: Rule {
1919
public init(regex:String){
2020
REGEX = regex
2121
}
22-
22+
2323
public func validate(value: String) -> Bool {
2424
if let test = NSPredicate(format: "SELF MATCHES %@", self.REGEX) {
2525
if test.evaluateWithObject(value) {

Validator/PasswordRule.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class PasswordRule : Rule {
2929
public init(regex:String){
3030
self.REGEX = regex
3131
}
32-
32+
3333
public func validate(value: String) -> Bool {
3434
if let test = NSPredicate(format: "SELF MATCHES %@", self.REGEX) {
3535
if test.evaluateWithObject(value) {

Validator/ZipCodeRule.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import Foundation
1010

1111
public class ZipCodeRule: Rule {
12+
1213
private let REGEX: String
1314

1415
init(){
@@ -17,7 +18,7 @@ public class ZipCodeRule: Rule {
1718
init(regex:String){
1819
self.REGEX = regex
1920
}
20-
21+
2122
public func validate(value: String) -> Bool {
2223
if let test = NSPredicate(format: "SELF MATCHES %@", self.REGEX) {
2324
if test.evaluateWithObject(value) {

0 commit comments

Comments
 (0)