--- number.inc.org	2013-07-04 16:54:23.000000000 +0000
+++ number.inc	2013-07-04 16:56:13.000000000 +0000
@@ -544,9 +544,27 @@
   $value = trim($element['#value']);
   form_set_value($element, $value, $form_state);
 
+if ($element["#webform_component"]["form_key"] == "alestur_rafmagn_1_alestur") {
+#print_r($value); die("k");
+}
+
   if ($value != '') {
     // Numeric test.
+
+	$value_userinput = $value;
+
+     if ($element["#webform_component"]["extra"]["point"] == ",") {
+        // Here we are working with commas as point-separators. However,
+        // webforms does not format the value correctly at this point, so is_numeric() will fail
+        // with numbers such as "15,9". To make things work, we change the comma separator,
+        // and do the checks with "." as point separator.
+
+       $value = str_replace(array(".", ","), array("_DOT_", "_COMMA_"), $value);
+       $value = str_replace(array("_DOT_", "_COMMA_"), array(",", "."), $value);
+    }
+
     if (is_numeric($value)) {
+
       // Range test.
       if ($element['#min'] != '' && $element['#max'] != '') {
         // Flip minimum and maximum if needed.
@@ -559,7 +577,7 @@
           $max = $element['#min'];
         }
         if ($value > $max || $value < $min) {
-          form_error($element, t('%name field value of @value should be in the range @min to @max.', array('%name' => $element['#title'], '@value' => $value, '@min' => $min, '@max' => $max)));
+          form_error($element, t('%name field value of @value should be in the range @min to @max.', array('%name' => $element['#title'], '@value' => $value_userinput, '@min' => $min, '@max' => $max)));
         }
       }
       elseif ($element['#max'] != '' && $value > $element['#max']) {
@@ -571,7 +589,7 @@
 
       // Integer test.
       if ($element['#integer'] && !is_int($value * 1)) {
-        form_error($element, t('%name field value of @value must be an integer.', array('%name' => $element['#title'], '@value' => $value)));
+        form_error($element, t('%name field value of @value must be an integer.', array('%name' => $element['#title'], '@value' => $value_userinput)));
       }
 
       // Step test.
@@ -592,7 +610,7 @@
       }
     }
     else {
-      form_error($element, t('%name field value of @value must be numeric.', array('%name' => $element['#title'], '@value' => $value)));
+      form_error($element, t('%name field value of @value must be numeric.', array('%name' => $element['#title'], '@value' => $value_userinput)));
     }
   }
 
