added validation
This commit is contained in:
parent
2d8ca3f2a3
commit
9f05f9fb13
@ -316,6 +316,22 @@ function ftoverride_civicrm_pre($op, $objectName, $id, &$params) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements hook_civicrm_validateForm().
|
||||||
|
*
|
||||||
|
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_validateForm
|
||||||
|
*/
|
||||||
|
function ftoverride_civicrm_validateForm($formName, &$fields, &$files, &$form, &$errors) {
|
||||||
|
if ('CRM_Contribute_Form_Contribution_Main' == $formName) {
|
||||||
|
if (!empty($fields['designation'])
|
||||||
|
&& $fields['designation'] == 'other_financial_type'
|
||||||
|
&& empty($fields['designation_note'])
|
||||||
|
) {
|
||||||
|
$errors['designation_note'] = ts('Please provide other information about designation.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements hook_civicrm_buildAmount().
|
* Implements hook_civicrm_buildAmount().
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user