*** custom_username_validation.module	2009-09-14 10:43:34.000000000 +0200
--- custom_username_validation.module.new	2010-06-17 10:37:09.000000000 +0200
***************
*** 44,49 ****
--- 44,56 ----
      '#description' => t("See PHP's preg_match() for details. Example: /^0049[1-9]{1}+[0-9]{1,10}$/")
    );
  
+   $form['custom_username_validation_hint'] = array(
+     '#type' => 'textfield',
+     '#title' => t('Username description in register/edit forms'),
+     '#default_value' => variable_get('custom_username_validation_hint', ''),
+     '#description' => t("Description message to override Drupal's default username description on user registration/edit forms. Leave blank to use Drupal's default.")
+   );
+   
    $form['custom_username_validation_errormsg'] = array(
      '#type' => 'textfield',
      '#title' => t('Error message'),
***************
*** 67,72 ****
--- 74,82 ----
  function custom_username_validation_form_alter(&$form, &$form_state, $form_id) {
    if ($form_id == 'user_register' || $form_id == 'user_edit') {
      $form['#validate'][] = 'custom_username_validation_username_validate';
+     $hint = variable_get('custom_username_validation_hint', '');
+     if ($hint != "")
+       $form['account']['name']['#description'] = $hint;
    }
  }
  
