Minor changes to CRM-15557
authorRohan Katkar <rohan.katkar@webaccessglobal.com>
Tue, 25 Nov 2014 12:47:00 +0000 (18:17 +0530)
committerRohan Katkar <rohan.katkar@webaccessglobal.com>
Thu, 27 Nov 2014 10:43:04 +0000 (16:13 +0530)
CRM/Price/BAO/PriceField.php

index 2d98f9b01a55d30de023de0c68c70c5beef68184..ce8d7b0f671595780d0d4b137b95c5636d7cf3ea 100644 (file)
@@ -340,8 +340,14 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField {
         }
 
         //CRM-10117
-        $message = ts('%1 must be in proper money format (decimal point/comma/space is allowed).', array(1 => $label));
-        $type = 'money';
+        if (!empty($qf->_quickConfig)) {
+          $message = ts('Please enter a valid amount.');
+          $type = 'money';
+        }
+        else {
+          $message = ts('%1 must be a number (with or without decimal point).', array(1 => $label));
+          $type = 'numeric';
+        }
         // integers will have numeric rule applied to them.
         $qf->addRule($elementName, $message, $type);
         break;