add validator for nickEdit and roomEdit
diff --git a/demo/settingdialog.cpp b/demo/settingdialog.cpp
index 9cb54f4..8f0bbca 100644
--- a/demo/settingdialog.cpp
+++ b/demo/settingdialog.cpp
@@ -6,8 +6,13 @@
   : QDialog(parent)
 {
   setupUi(this);
+
+  QRegExp noWhiteSpace("^\\S+.*$");
+  QValidator *nwsValidator = new QRegExpValidator(noWhiteSpace, this);
   nickEdit->setPlaceholderText(nick);
+  nickEdit->setValidator(nwsValidator);
   roomEdit->setPlaceholderText(chatroom);
+  roomEdit->setValidator(nwsValidator);
   prefixEdit->setPlaceholderText(prefix);
 
   // simple validator for ccnx prefix