diff --git a/variable.form.inc b/variable.form.inc
index dd36dda..f4f87cf 100644
--- a/variable.form.inc
+++ b/variable.form.inc
@@ -19,6 +19,9 @@ function variable_form_element($variable, $options = array()) {
   else {
     $element = variable_form_element_default($variable, $options); 
   }
+  if (!empty($variable['validate callback'])) {
+    $element['#element_validate'][] = $variable['validate callback'];
+  }
   $element += array('#access' => variable_access($variable));
   if (!empty($variable['required'])) {
     $element += array('#required' => TRUE);
diff --git a/variable.variable.inc b/variable.variable.inc
index 34d8d67..2b7dc1d 100644
--- a/variable.variable.inc
+++ b/variable.variable.inc
@@ -81,6 +81,10 @@ function variable_variable_type_info() {
   $type['number'] = array(
     'title' => t('Number'),
     'element' => array('#type' => 'textfield', '#size' => 15, '#maxlength' => 10),
+    // This one utilizes field.module (which cannot be disabled). Once
+    // http://drupal.org/node/1174444 gets committed, we could simply use
+    // 'element_validate_number' here.
+    'validate callback' => '_element_validate_number',
   );
   // Select multiple options from multiple choices
   $type['options'] = array(
