中文字幕在线观看,亚洲а∨天堂久久精品9966,亚洲成a人片在线观看你懂的,亚洲av成人片无码网站,亚洲国产精品无码久久久五月天

iOS驗(yàn)證電話

2018-07-20    來源:open-open

容器云強(qiáng)勢上線!快速搭建集群,上萬Linux鏡像隨意使用
//textField.text 為你要獲取的值
NSString *P_textfield = [textField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
    ////////miller 手機(jī) 推薦驗(yàn)證
    /**
     * 手機(jī)號(hào)碼
     * 移動(dòng):134[0-8],135,136,137,138,139,150,151,157,158,159,182,187,188
     * 聯(lián)通:130,131,132,152,155,156,185,186
     * 電信:133,1349,153,180,189
     */
    NSString * MOBILE = @"^1(3[0-9]|5[0-35-9]|8[025-9])\\d{8}$";
    /**
     10         * 中國移動(dòng):China Mobile
     11         * 134[0-8],135,136,137,138,139,150,151,157,158,159,182,187,188
     12         */
    NSString * CM = @"^1(34[0-8]|(3[5-9]|5[017-9]|8[278])\\d)\\d{7}$";
    /**
     15         * 中國聯(lián)通:China Unicom
     16         * 130,131,132,152,155,156,185,186
     17         */
    NSString * CU = @"^1(3[0-2]|5[256]|8[56])\\d{8}$";
    /**
     20         * 中國電信:China Telecom
     21         * 133,1349,153,180,189
     22         */
    NSString * CT = @"^1((33|53|8[09])[0-9]|349)\\d{7}$";
    /**
     25         * 大陸地區(qū)固話及小靈通
     26         * 區(qū)號(hào):010,020,021,022,023,024,025,027,028,029
     27         * 號(hào)碼:七位或八位
     28         */
    // NSString * PHS = @"^0(10|2[0-5789]|\\d{3})\\d{7,8}$";
     
    NSPredicate *regextestmobile = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", MOBILE];
    NSPredicate *regextestcm = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", CM];
    NSPredicate *regextestcu = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", CU];
    NSPredicate *regextestct = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", CT];
     
    if (([regextestmobile evaluateWithObject:P_textfield] == YES)
        || ([regextestcm evaluateWithObject:P_textfield] == YES)
        || ([regextestct evaluateWithObject:P_textfield] == YES)
        || ([regextestcu evaluateWithObject:P_textfield] == YES))
    {
       UIAlertView *P_sendSMSAlert = [[UIAlertView alloc] initWithTitle:@"確認(rèn)操作"
                                                    message:@"系統(tǒng)將發(fā)送一條消息給自己的好友"
                                                   delegate:self
                                          cancelButtonTitle:@"確定"
                                          otherButtonTitles:@"取消", nil];
        [P_sendSMSAlert show];
    }
    else
    {
        UIAlertView *sendSMS = [[UIAlertView alloc] initWithTitle:@"錯(cuò)誤"
                                                          message:@"輸入的手機(jī)號(hào)碼格式有誤!"
                                                         delegate:self
                                                cancelButtonTitle:@"確定"
                                                otherButtonTitles:nil];
        [sendSMS show];
    }

標(biāo)簽:

版權(quán)申明:本站文章部分自網(wǎng)絡(luò),如有侵權(quán),請(qǐng)聯(lián)系:west999com@outlook.com
特別注意:本站所有轉(zhuǎn)載文章言論不代表本站觀點(diǎn)!
本站所提供的圖片等素材,版權(quán)歸原作者所有,如需使用,請(qǐng)與原作者聯(lián)系。

上一篇:HTML5頁面點(diǎn)擊和左右滑動(dòng)頁面滾動(dòng)

下一篇:PHP算式驗(yàn)證碼和漢字驗(yàn)證碼的實(shí)現(xiàn)方法