Commit 8a10fbf098144044a7ed9e2be21cc5cf028f4904
1 parent
2cd76578
登录与忘记密码实际判断情况不符修改
Showing
1 changed file
with
2 additions
and
2 deletions
CNLiveScioLive/Pages/Tools/ValidationTool/NSString+Validation.m
| ... | ... | @@ -316,9 +316,9 @@ |
| 316 | 316 | //只包含数字和字母 |
| 317 | 317 | - (BOOL)isValidPassWordLegal{ |
| 318 | 318 | BOOL result = false; |
| 319 | - if ([self length] >= 8 && [self length] <= 16){ | |
| 319 | + if ([self length] >= 6 && [self length] <= 16){ | |
| 320 | 320 | // 判断长度大于8位后再接着判断是否同时包含数字和字符 |
| 321 | - NSString * regex = @"^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$"; | |
| 321 | + NSString * regex = @"^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$"; | |
| 322 | 322 | NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex]; |
| 323 | 323 | result = [pred evaluateWithObject:self]; |
| 324 | 324 | } | ... | ... |