0
我有一個問題,當我從UITeField到PHP發佈的文字,如果我留一個空格,或者使用奇怪的符號(即!,@,#^,&,{} ...)如何驗證UITextField的內容?
我可以阻止IBaction不發送這個無用的文本到服務器?
- (IBAction)sendeTextToServer:(id)sender{
if(textfield.text has any space or other symbols inside){
//Block the text send to server
}
else
//Send the text to server to do something.
}
如何驗證UITextField的內容?
參見:http://stackoverflow.com/questions/5393377/objective-c-regex-format-creditcard – magma 2011-04-18 03:07:14
感謝,現在我期待這個頁面,還是儘量理解現在 – 2011-04-18 03:08:10
和:HTTP:// www.codinghorror.com/blog/2008/06/regular-expressions-now-you-have-two-problems.html – magma 2011-04-18 03:09:46