? files
? sites/all/modules
? sites/default/settings.php
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.200
diff -u -F^f -r1.200 form.inc
--- includes/form.inc	28 May 2007 18:53:29 -0000	1.200
+++ includes/form.inc	30 May 2007 04:55:18 -0000
@@ -1242,6 +1242,16 @@ function password_confirm_validate($form
 }
 
 /**
+ * Validate an email element.
+ */
+function email_validate($form) {
+  $mail = $form['#value'];
+  if ($mail && !valid_email_address($mail)) {
+    form_set_error($form['#name'], t('E-mail address is invalid.'));
+  }
+}
+
+/**
  * Format a date selection element.
  *
  * @param $element
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.484
diff -u -F^f -r1.484 system.module
--- modules/system/system.module	28 May 2007 06:08:44 -0000	1.484
+++ modules/system/system.module	30 May 2007 04:55:20 -0000
@@ -107,6 +107,11 @@ function system_elements() {
   $type['select'] = array('#input' => TRUE, '#size' => 0, '#multiple' => FALSE);
   $type['weight'] = array('#input' => TRUE, '#delta' => 10, '#default_value' => 0, '#process' => array('process_weight'));
   $type['date'] = array('#input' => TRUE, '#process' => array('expand_date' => array()), '#element_validate' => array('date_validate'));
+  $type['email'] = array(
+    '#input' => TRUE,
+    '#type' => 'textfield',
+    '#element_validate' => array('email_validate'),
+  );
   $type['file'] = array('#input' => TRUE, '#size' => 60);
 
   // Form structure
