diff -ur empathy-2.31.92/libempathy/empathy-account-settings.c empathy-2.31.92.patched//libempathy/empathy-account-settings.c
--- empathy-2.31.92/libempathy/empathy-account-settings.c	2010-09-09 11:20:03.000000000 +0400
+++ empathy-2.31.92.patched//libempathy/empathy-account-settings.c	2010-10-01 04:40:57.000000000 +0400
@@ -68,6 +68,7 @@
   gboolean ready;
 
   GHashTable *parameters;
+  GHashTable *param_regexps;
   GArray *unset_parameters;
   GArray *required_params;
 
@@ -91,6 +92,9 @@
   priv->parameters = g_hash_table_new_full (g_str_hash, g_str_equal,
     g_free, (GDestroyNotify) tp_g_value_slice_free);
 
+  priv->param_regexps = g_hash_table_new_full (g_str_hash, g_str_equal,
+    g_free, (GDestroyNotify) tp_g_value_slice_free);
+
   priv->unset_parameters = g_array_new (TRUE, FALSE, sizeof (gchar *));
 }
 
@@ -336,6 +340,7 @@
     g_array_free (priv->required_params, TRUE);
 
   g_hash_table_destroy (priv->parameters);
+  g_hash_table_destroy (priv->param_regexps);
 
   empathy_account_settings_free_unset_parameters (self);
   g_array_free (priv->unset_parameters, TRUE);
@@ -1287,13 +1292,27 @@
   return (!tp_strdiff (account_path, priv_account_path));
 }
 
+void
+empathy_account_settings_set_regex (EmpathyAccountSettings *settings,
+    const gchar *param,
+    const gchar *regex)
+{
+  EmpathyAccountSettingsPriv *priv = GET_PRIV (settings);
+
+  tp_asv_set_string (priv->param_regexps, g_strdup (param), g_strdup (regex));
+}
+
 gboolean
 empathy_account_settings_is_valid (EmpathyAccountSettings *settings)
 {
   EmpathyAccountSettingsPriv *priv;
   guint idx;
   gchar *current;
-  gboolean missed = FALSE;
+  const gchar *current_regex;
+  const gchar *current_value;
+  const GValue *v;
+  gboolean is_valid = TRUE;
+  GHashTableIter iter;
 
   g_return_val_if_fail (EMPATHY_IS_ACCOUNT_SETTINGS (settings), FALSE);
 
@@ -1318,11 +1337,18 @@
             continue;
         }
 
-      missed = TRUE;
-      break;
+      return FALSE;
+    }
+
+  g_hash_table_iter_init (&iter, (GHashTable *)priv->param_regexps);
+  while (g_hash_table_iter_next (&iter, (gpointer *) &current, (gpointer *) &v))
+    {
+      current_regex = g_value_get_string (v);
+      current_value = empathy_account_settings_get_string (settings, current);
+      is_valid &= g_regex_match_simple (current_regex, current_value, 0, 0);
     }
 
-  return !missed;
+  return is_valid;
 }
 
 const TpConnectionManagerProtocol *
diff -ur empathy-2.31.92/libempathy/empathy-account-settings.h empathy-2.31.92.patched//libempathy/empathy-account-settings.h
--- empathy-2.31.92/libempathy/empathy-account-settings.h	2010-09-09 11:20:03.000000000 +0400
+++ empathy-2.31.92.patched//libempathy/empathy-account-settings.h	2010-09-30 21:58:55.000000000 +0400
@@ -172,6 +172,10 @@
   GAsyncResult *result,
   GError **error);
 
+void empathy_account_settings_set_regex (EmpathyAccountSettings *settings,
+  const gchar *param,
+  const gchar *regex);
+
 gboolean empathy_account_settings_is_valid (EmpathyAccountSettings *settings);
 
 const TpConnectionManagerProtocol * empathy_account_settings_get_tp_protocol (
diff -ur empathy-2.31.92/libempathy-gtk/empathy-account-widget.c empathy-2.31.92.patched//libempathy-gtk/empathy-account-widget.c
--- empathy-2.31.92/libempathy-gtk/empathy-account-widget.c	2010-09-13 18:34:51.000000000 +0400
+++ empathy-2.31.92.patched//libempathy-gtk/empathy-account-widget.c	2010-10-01 14:45:16.000000000 +0400
@@ -116,6 +116,34 @@
 #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyAccountWidget)
 #define CHANGED_TIMEOUT 300
 
+#define DIGIT             "0-9"
+#define DIGITS            "(["DIGIT"]+)"
+#define ALPHA             "a-zA-Z"
+#define ALPHAS            "(["ALPHA"]+)"
+#define ALPHADIGIT        ALPHA DIGIT
+#define ALPHADIGITS       "(["ALPHADIGIT"]+)"
+#define ALPHADIGITDASH    ALPHA DIGIT "-"
+#define ALPHADIGITDASHS   "(["ALPHADIGITDASH"]*)"
+
+#define HOSTNUMBER        "("DIGITS"\\."DIGITS"\\."DIGITS"\\."DIGITS")"
+#define TOPLABEL          ALPHAS"|(["ALPHA"]" ALPHADIGITDASHS "["ALPHADIGIT"])"
+#define DOMAINLABEL       ALPHADIGITS"|(["ALPHADIGIT"]" ALPHADIGITDASHS \
+                                       "["ALPHADIGIT"])"
+#define HOSTNAME          "((" DOMAINLABEL "\\.)+" TOPLABEL ")"
+#define HOST              "("HOSTNAME "|" HOSTNUMBER")"
+
+#define ICQ_USER_NAME     DIGITS
+#define IRC_USER_NAME     "(["ALPHADIGITDASH"_\\[\\]{}\\\\|`^]+)"
+#define JABBER_USER_NAME  "([^@:'\"<>&\\s]+)"
+#define MSN_USER_NAME     "(["ALPHADIGITDASH"_\\.]+)"
+#define YAHOO_USER_NAME   "(["ALPHA"]["ALPHADIGIT"_\\.]{3,31})"
+
+#define ACCOUNT_REGEX_ICQ      "^"ICQ_USER_NAME"$"
+#define ACCOUNT_REGEX_IRC      "^"IRC_USER_NAME"$"
+#define ACCOUNT_REGEX_JABBER   "^"JABBER_USER_NAME"@"HOST"$"
+#define ACCOUNT_REGEX_MSN      "^"MSN_USER_NAME"@"HOST"$"
+#define ACCOUNT_REGEX_YAHOO    "^"YAHOO_USER_NAME"$"
+
 static void
 account_widget_set_control_buttons_sensitivity (EmpathyAccountWidget *self,
     gboolean sensitive)
@@ -948,6 +976,9 @@
 {
   EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
 
+  empathy_account_settings_set_regex (priv->settings, "account",
+      ACCOUNT_REGEX_IRC);
+
   if (priv->simple)
     {
       priv->irc_network_chooser = empathy_account_widget_irc_build_simple (self,
@@ -975,6 +1006,9 @@
 {
   EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
 
+  empathy_account_settings_set_regex (priv->settings, "account",
+      ACCOUNT_REGEX_MSN);
+
   if (priv->simple)
     {
       self->ui_details->gui = empathy_builder_get_file (filename,
@@ -1104,6 +1138,9 @@
   is_gtalk = account_widget_is_gtalk (self);
   is_facebook = account_widget_is_facebook (self);
 
+  empathy_account_settings_set_regex (priv->settings, "account",
+      ACCOUNT_REGEX_JABBER);
+
   if (priv->simple && !is_gtalk && !is_facebook)
     {
       /* Simple widget for XMPP */
@@ -1228,6 +1265,9 @@
   EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
   GtkWidget *spinbutton_port;
 
+  empathy_account_settings_set_regex (priv->settings, "account",
+      ACCOUNT_REGEX_ICQ);
+
   if (priv->simple)
     {
       self->ui_details->gui = empathy_builder_get_file (filename,
@@ -1306,6 +1346,9 @@
 {
   EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
 
+  empathy_account_settings_set_regex (priv->settings, "account",
+      ACCOUNT_REGEX_YAHOO);
+
   if (priv->simple)
     {
       self->ui_details->gui = empathy_builder_get_file (filename,
