如何验证UITextField的内容?

| 将文本从UITeField发布到PHP时,如果我留有空格或使用奇怪的符号(例如,!,@,#,^,&,{} ...),我会遇到问题。 我可以阻止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的内容?     
已邀请:
使用正则表达式!我已经在许多项目中使用RegexKitLite取得了很大的成功。 编辑:这是一个链接表单,有关如何使用它的另一个答案。     

要回复问题请先登录注册