Skip to content

Commit 91ef7c3

Browse files
committed
minor fixes in comments
1 parent f99a46c commit 91ef7c3

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

SwiftValidator/Rules/CardExpiryRule.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// CardExpiryRule.swift
33
// SwiftValidator
44
//
5-
// Created by Sprinthub on 13/03/2019.
5+
// Created by Mark Boleigha on 13/03/2019.
66
// Copyright © 2019 jpotts18. All rights reserved.
77
//
88

@@ -17,10 +17,10 @@ public class CardExpiryRule: Rule {
1717
/// Error message to be displayed if validation fails.
1818
private var message : String
1919
/**
20-
Initializes `CardNumberRule` object with error message. Used to validate a card's expiry month.
20+
Initializes `CardExpiryRule` object with error message. Used to validate a card's expiry year.
2121

2222
- parameter message: String of error message.
23-
- returns: An initialized `CardNumberRule` object, or nil if an object could not be created for some reason that would not result in an exception.
23+
- returns: An initialized `CardExpiryRule` object, or nil if an object could not be created for some reason that would not result in an exception.
2424
*/
2525
public init(message : String = "Card expiry date is invalid"){
2626
self.message = message
@@ -29,7 +29,7 @@ public class CardExpiryRule: Rule {
2929
/**
3030
Validates a field.
3131

32-
- parameter value: String to check for validation.
32+
- parameter value: String to check for validation. must be a card expiry date in MM/YY format
3333
- returns: Boolean value. True on successful validation, otherwise False on failed Validation.
3434
*/
3535
public func validate(_ value: String) -> Bool {

SwiftValidator/Rules/CardNumberRule.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@ public class CardNumberRule: Rule {
3434
guard CardState(fromNumber: cardNoFull) != .invalid else {
3535
return false
3636
}
37-
// let cardState = CardState(fromNumber: cardNoFull)
38-
// switch cardState {
39-
// case .identified(let cardType):
40-
// print(cardType)
41-
// case .indeterminate:
42-
// print("undefined")
43-
// case .invalid:
44-
// print("invalid")
45-
// }
4637

4738
return true
4839

0 commit comments

Comments
 (0)