Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.37
diff -u -p -r1.37 system.admin.inc
--- modules/system/system.admin.inc	16 Dec 2007 21:01:45 -0000	1.37
+++ modules/system/system.admin.inc	19 Dec 2007 14:26:35 -0000
@@ -1152,11 +1152,27 @@ function system_site_information_setting
     '#description' => t('The home page displays content from this relative URL. If unsure, specify "node".'),
     '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=')
   );
+  $form['#validate'][] = 'system_site_information_settings_validate';
 
   return system_settings_form($form);
 }
 
 /**
+ * Validate the submitted site-information form.
+ */
+function system_site_information_settings_validate($form, &$form_state) {
+  // Validate the e-mail address.
+  if ($error = user_validate_mail($form_state['values']['site_mail'])) {
+    form_set_error('site_mail', $error);
+  }
+  //Validate front page path.
+  $item = array('link_path' => $form_state['values']['site_frontpage']);
+  if (!empty($item) && !menu_valid_path($item)) {
+    form_set_error('site_frontpage', t("The path '@path' is either invalid or you do not have access to it.", array('@path' => $item['link_path'])));
+  }
+}
+
+/**
  * Form builder; Configure error reporting settings.
  *
  * @ingroup forms
@@ -1188,10 +1204,27 @@ function system_error_reporting_settings
     '#description' =>  t('Specify where Drupal, PHP and SQL errors are logged. While it is recommended that a site running in a production environment write errors to the log only, in a development or testing environment it may be helpful to write errors both to the log and to the screen.')
   );
 
+  $form['#validate'][] = 'system_error_reporting_settings_validate';
+  
   return system_settings_form($form);
 }
 
 /**
+ * Validate of error reporting forms.
+ */
+function system_error_reporting_settings_validate($form, &$form_state) {
+  // Validate 403 and 404 errors.
+  $item = array('link_path' => $form_state['values']['site_403']);
+  if (!empty($item['link_path']) && !menu_valid_path($item)) {
+    form_set_error('site_403', t("The path '@path' is either invalid or you do not have access to it.", array('@path' => $item['link_path'])));
+  }
+  $item = array('link_path' => $form_state['values']['site_404']);
+  if (!empty($item['link_path']) && !menu_valid_path($item)) {
+    form_set_error('site_404', t("The path '@path' is either invalid or you do not have access to it.", array('@path' => $item['link_path'])));
+  }
+}
+
+/**
  * Menu callback; Menu page for the various logging options.
  */
 function system_logging_overview() {
@@ -1379,11 +1412,25 @@ function system_image_toolkit_settings()
   }
 
   $form['image_toolkit_settings'] = image_toolkit_invoke('settings');
+  $form['#validate'][] = 'system_image_toolkit_settings_validate';
 
   return system_settings_form($form);
 }
 
 /**
+ * Validate the submitted image-toolkit form.
+ */
+function system_image_toolkit_settings_validate($form, &$form_state) {
+  // Validate image quality range.
+  if (!is_numeric($form_state['values']['image_jpeg_quality'])) {
+    form_set_error('image_jpeg_quality', t('Image jpeg quality must be a number between 0 and 100.'));        
+  }
+  else if ($form_state['values']['image_jpeg_quality'] <0 || $form_state['values']['image_jpeg_quality'] > 100) {
+    form_set_error('image_jpeg_quality', t('Image jpeg quality valid range is 0 to 100.'));
+  }
+}
+
+/**
  * Form builder; Configure how the site handles RSS feeds.
  *
  * @ingroup forms
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.562
diff -u -p -r1.562 system.module
--- modules/system/system.module	16 Dec 2007 21:01:45 -0000	1.562
+++ modules/system/system.module	19 Dec 2007 14:26:37 -0000
@@ -988,7 +988,6 @@ function system_settings_form($form) {
     drupal_set_message(t('The settings have not been saved because of the errors.'), 'error');
   }
   $form['#submit'][] = 'system_settings_form_submit';
-  $form['#validate'][] = 'system_settings_form_validate';
   $form['#theme'] = 'system_settings_form';
   return $form;
 }
