added validation for money
This commit is contained in:
parent
cb23c5152b
commit
aa4779024c
@ -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');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user