diff --git a/api/v3/GrantBudget.php b/api/v3/GrantBudget.php index fcac915..d65cea6 100644 --- a/api/v3/GrantBudget.php +++ b/api/v3/GrantBudget.php @@ -15,6 +15,9 @@ function civicrm_api3_grant_budget_create($params) { if (!empty($params['budget'])) { $params['budget'] = CRM_Utils_Rule::cleanMoney($params['budget']); + if (!is_numeric($params['budget'] )) { + throw new Exception(ts('Annual Budget is not in money format.')); + } } return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'GrantBudget'); }