Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import "phoneFormatter.h"
  2.  
  3.  
  4. @implementation phoneFormatter
  5.  
  6. - (BOOL)isPartialStringValid:(NSString *)partialString newEditingString:(NSString **)newString errorDescription:(NSString **)error
  7. /* this validates the field's value as each key is entered into textfield */
  8. {
  9.     /* validate the partial string */
  10.     NSDecimalNumber *check; /* used to hold temp value */
  11.     if ([self getObjectValue:&check forString:partialString errorDescription:error]) {
  12.         return TRUE;
  13.     }
  14.     else
  15.     {
  16.         NSBeep();
  17.         return FALSE;
  18.      }
  19. }
  20.  
  21. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement