diff -ur empathy-2.32.0.1/libempathy/empathy-account-settings.c empathy-2.32.0.1.patched//libempathy/empathy-account-settings.c
--- empathy-2.32.0.1/libempathy/empathy-account-settings.c	2010-10-04 17:52:45.000000000 +0400
+++ empathy-2.32.0.1.patched//libempathy/empathy-account-settings.c	2010-10-09 00:07:59.000000000 +0400
@@ -67,7 +67,13 @@
   gboolean display_name_overridden;
   gboolean ready;
 
+  /* Parameter name (gchar *) -> parameter value (GValue) */
   GHashTable *parameters;
+  /* Keys are parameter names from the hash above (gchar *).
+   * Values are regular expresion patterns that should match corresponding
+   * parameter values (gchar *). Possible regexps are defined in
+   * empathy-account-widget.c */
+  GHashTable *param_regexps;
   GArray *unset_parameters;
   GArray *required_params;
 
@@ -91,6 +97,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, g_free);
+
   priv->unset_parameters = g_array_new (TRUE, FALSE, sizeof (gchar *));
 }
 
@@ -336,6 +345,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 +1297,27 @@
   return (!tp_strdiff (account_path, priv_account_path));
 }
 
-gboolean
-empathy_account_settings_is_valid (EmpathyAccountSettings *settings)
+void
+empathy_account_settings_set_regex (EmpathyAccountSettings *settings,
+    const gchar *param,
+    const gchar *regex)
+{
+  EmpathyAccountSettingsPriv *priv = GET_PRIV (settings);
+
+  g_hash_table_insert (priv->param_regexps, g_strdup (param), g_strdup (regex));
+}
+
+GList *
+empathy_account_settings_get_invalid_parameters (
+    EmpathyAccountSettings *settings)
 {
   EmpathyAccountSettingsPriv *priv;
   guint idx;
+  GList *result = NULL;
   gchar *current;
-  gboolean missed = FALSE;
+  const gchar *current_regex;
+  const gchar *current_value;
+  GHashTableIter iter;
 
   g_return_val_if_fail (EMPATHY_IS_ACCOUNT_SETTINGS (settings), FALSE);
 
@@ -1318,11 +1342,27 @@
             continue;
         }
 
-      missed = TRUE;
-      break;
+      result = g_list_append (result, current);
+    }
+
+  g_hash_table_iter_init (&iter, priv->param_regexps);
+  while (g_hash_table_iter_next (&iter, (gpointer *) &current,
+      (gpointer *) &current_regex))
+    {
+      current_value = empathy_account_settings_get_string (settings, current);
+      if (!current_value)
+        continue;
+      if (!g_regex_match_simple (current_regex, current_value, 0, 0))
+        result = g_list_append (result, current);
     }
 
-  return !missed;
+  return result;
+}
+
+gboolean
+empathy_account_settings_is_valid (EmpathyAccountSettings *settings)
+{
+  return empathy_account_settings_get_invalid_parameters (settings) == NULL;
 }
 
 const TpConnectionManagerProtocol *
diff -ur empathy-2.32.0.1/libempathy/empathy-account-settings.h empathy-2.32.0.1.patched//libempathy/empathy-account-settings.h
--- empathy-2.32.0.1/libempathy/empathy-account-settings.h	2010-10-04 17:52:45.000000000 +0400
+++ empathy-2.32.0.1.patched//libempathy/empathy-account-settings.h	2010-10-08 22:55:59.000000000 +0400
@@ -172,6 +172,13 @@
   GAsyncResult *result,
   GError **error);
 
+void empathy_account_settings_set_regex (EmpathyAccountSettings *settings,
+  const gchar *param,
+  const gchar *regex);
+
+GList *empathy_account_settings_get_invalid_parameters (
+    EmpathyAccountSettings *settings);
+
 gboolean empathy_account_settings_is_valid (EmpathyAccountSettings *settings);
 
 const TpConnectionManagerProtocol * empathy_account_settings_get_tp_protocol (
diff -ur empathy-2.32.0.1/libempathy-gtk/empathy-account-widget.c empathy-2.32.0.1.patched//libempathy-gtk/empathy-account-widget.c
--- empathy-2.32.0.1/libempathy-gtk/empathy-account-widget.c	2010-10-04 13:19:26.000000000 +0400
+++ empathy-2.32.0.1.patched//libempathy-gtk/empathy-account-widget.c	2010-10-11 15:12:15.000000000 +0400
@@ -88,6 +88,11 @@
   GtkWidget *param_account_widget;
   GtkWidget *param_password_widget;
 
+  /* Contains parameter names (gchar *) having invalid values */
+  GList *invalid_parameters;
+  /* Parameter name (gchar *) -> associated widget (GtkWidget *) */
+  GHashTable *input_widgets;
+
   /* Used only for IRC accounts */
   EmpathyIrcNetworkChooser *irc_network_chooser;
 
@@ -116,6 +121,35 @@
 #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 IRC_SPECIAL       "_\\[\\]{}\\\\|`^"
+
+#define ICQ_USER_NAME     DIGITS
+#define IRC_USER_NAME     "(["ALPHA IRC_SPECIAL"]["ALPHADIGITDASH IRC_SPECIAL"]*)"
+#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)
@@ -136,6 +170,73 @@
 }
 
 static void
+account_widget_set_input_widget_highlighting (GtkWidget *widget,
+    gboolean highlight)
+{
+  GdkColor color;
+  GtkStyle *style;
+
+  g_return_if_fail (GTK_IS_WIDGET (widget));
+
+  style = gtk_widget_get_style (widget);
+
+  if (highlight)
+    {
+      color = style->bg[GTK_STATE_SELECTED];
+
+      /* Here we take the current theme colour and add it to
+       * the colour for white and average the two. This
+       * gives a colour which is inline with the theme but
+       * slightly whiter.
+       */
+      color.red = (color.red + (style->white).red) / 2;
+      color.green = (color.green + (style->white).green) / 2;
+      color.blue = (color.blue + (style->white).blue) / 2;
+
+      gtk_widget_modify_base (widget, GTK_STATE_NORMAL, &color);
+    }
+  else
+    gtk_widget_modify_base (widget, GTK_STATE_NORMAL, NULL);
+}
+
+static void
+account_widget_update_invalid_input_highlighting (EmpathyAccountWidget *self)
+{
+  EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
+  GList *new_invalid_parameters;
+  GList *l;
+  GtkWidget *widget;
+
+  new_invalid_parameters = empathy_account_settings_get_invalid_parameters (
+      priv->settings);
+
+  for (l = priv->invalid_parameters; l; l = l->next)
+    {
+      /* Disable highlighting if parameter is no longer invalid */
+      if (!g_list_find_custom (new_invalid_parameters, l->data,
+          (GCompareFunc) strcmp))
+        {
+          widget = g_hash_table_lookup (priv->input_widgets, l->data);
+          account_widget_set_input_widget_highlighting (widget, FALSE);
+        }
+    }
+
+  for (l = new_invalid_parameters; l; l = l->next)
+    {
+      /* Enable highlighting if a new one became invalid */
+      if (!g_list_find_custom (priv->invalid_parameters, l->data,
+         (GCompareFunc) strcmp))
+        {
+          widget = g_hash_table_lookup (priv->input_widgets, l->data);
+          account_widget_set_input_widget_highlighting (widget, TRUE);
+        }
+    }
+
+  g_list_free (priv->invalid_parameters);
+  priv->invalid_parameters = new_invalid_parameters;
+}
+
+static void
 account_widget_handle_control_buttons_sensitivity (EmpathyAccountWidget *self)
 {
   EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
@@ -379,6 +480,8 @@
   g_object_set_data_full (G_OBJECT (widget), "param_name",
       g_strdup (param_name), g_free);
 
+  g_hash_table_replace (priv->input_widgets, g_strdup (param_name), widget);
+
   if (GTK_IS_SPIN_BUTTON (widget))
     {
       gint value = 0;
@@ -948,6 +1051,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 +1081,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 +1213,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 +1340,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 +1421,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,
@@ -1378,6 +1496,13 @@
 }
 
 static void
+account_widget_map_cb (GtkWidget *widget,
+    EmpathyAccountWidget *self)
+{
+  account_widget_update_invalid_input_highlighting (self);
+}
+
+static void
 account_widget_destroy_cb (GtkWidget *widget,
     EmpathyAccountWidget *self)
 {
@@ -1844,6 +1969,10 @@
   g_signal_connect (self->ui_details->widget, "destroy",
       G_CALLBACK (account_widget_destroy_cb), self);
 
+  /* need to initialize input highlighting */
+  g_signal_connect (self->ui_details->widget, "map",
+      G_CALLBACK (account_widget_map_cb), self);
+
   empathy_builder_unref_and_keep_widget (self->ui_details->gui,
       self->ui_details->widget);
   self->ui_details->gui = NULL;
@@ -1892,6 +2021,14 @@
       priv->account_manager = NULL;
     }
 
+  if (priv->input_widgets != NULL)
+    {
+      g_hash_table_destroy (priv->input_widgets);
+      priv->input_widgets = NULL;
+    }
+
+  g_list_free (priv->invalid_parameters);
+
   if (G_OBJECT_CLASS (empathy_account_widget_parent_class)->dispose != NULL)
     G_OBJECT_CLASS (empathy_account_widget_parent_class)->dispose (obj);
 }
@@ -1986,6 +2123,8 @@
         EmpathyAccountWidgetPriv);
 
   self->priv = priv;
+  priv->input_widgets = g_hash_table_new_full (g_str_hash, g_str_equal,
+      g_free, NULL);
   priv->dispose_run = FALSE;
 
   self->ui_details = g_slice_new0 (EmpathyAccountWidgetUIDetails);
@@ -2116,6 +2255,7 @@
 {
   EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
 
+  account_widget_update_invalid_input_highlighting (self);
   account_widget_handle_control_buttons_sensitivity (self);
   priv->contains_pending_changes = TRUE;
 }
