Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import "phoneFormatter.h"
- @implementation phoneFormatter
- - (BOOL)isPartialStringValid:(NSString *)partialString newEditingString:(NSString **)newString errorDescription:(NSString **)error
- /* this validates the field's value as each key is entered into textfield */
- {
- /* validate the partial string */
- NSDecimalNumber *check; /* used to hold temp value */
- if ([self getObjectValue:&check forString:partialString errorDescription:error]) {
- return TRUE;
- }
- else
- {
- NSBeep();
- return FALSE;
- }
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement