- (BOOL)validateNumber:(NSString*)number {
BOOL res =YES;
NSCharacterSet* tmpSet = [NSCharacterSetcharacterSetWithCharactersInString:@"0123456789"];
inti =0;
while(i < number.length) {
NSString* string = [numbersubstringWithRange:NSMakeRange(i,1)];
NSRangerange = [stringrangeOfCharacterFromSet:tmpSet];
if(range.length==0) {
res =NO;
break;
}
i++;
}
returnres;
}