+ (BOOL)validateNum:(NSString *)num{
NSString *numRegex = @"^[0-9]+(.[0-9]{1,2})?$";
NSPredicate *numTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", numRegex];
return [numTest evaluateWithObject:num];
}
+ (BOOL)validateNum:(NSString *)num{
NSString *numRegex = @"^[0-9]+(.[0-9]{1,2})?$";
NSPredicate *numTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", numRegex];
return [numTest evaluateWithObject:num];
}