forked from card-io/card.io-iOS-source
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from yodle/add-cardholder-name
Add cardholder name
- Loading branch information
Showing
40 changed files
with
1,831 additions
and
1,598 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// CardIOConfigurableTextFieldDelegate.h | ||
// See the file "LICENSE.md" for the full license governing this code. | ||
// | ||
|
||
#import "CardIOConfigurableTextFieldDelegate.h" | ||
|
||
@interface CardIOCardholderNameTextFieldDelegate : CardIOConfigurableTextFieldDelegate { | ||
|
||
} | ||
|
||
+(BOOL)isValidCardholderName:(NSString*)cardholderName; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// CardIOCardholderNameTextFieldDelegate.m | ||
// See the file "LICENSE.md" for the full license governing this code. | ||
// | ||
|
||
#import "CardIOCardholderNameTextFieldDelegate.h" | ||
|
||
@implementation CardIOCardholderNameTextFieldDelegate | ||
|
||
-(id) init { | ||
if ((self = [super init])) { | ||
// Globalization: alphanumeric, space, hyphen are all definitely okay; | ||
// there's no compelling reason for us to get fussy here. | ||
self.numbersOnly = NO; | ||
self.maxLength = 175; // PayPal REST APIs accept max of 175 chars for cardholder name | ||
} | ||
return self; | ||
} | ||
|
||
+(BOOL)isValidCardholderName:(NSString*)cardholderName { | ||
return [cardholderName length] > 0; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.