Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 07c9f4d

Browse files
放宽电话号码规则的限制
1 parent 323c8e3 commit 07c9f4d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎Coding_iOS/Util/OC_Category/NSString+Common.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ - (BOOL)isPureFloat{
332332
}
333333
//判断是否是手机号码或者邮箱
334334
- (BOOL)isPhoneNo{
335-
NSString *phoneRegex = @"1[3|5|7|8|][0-9]{9}";
335+
// NSString *phoneRegex = @"1[3|5|7|8|][0-9]{9}";
336+
NSString *phoneRegex = @"[0-9]{1,15}";
336337
NSPredicate *phoneTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", phoneRegex];
337338
return [phoneTest evaluateWithObject:self];
338339
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /