function dfp_target_form_validate in Doubleclick for Publishers (DFP) 7
Same name and namespace in other branches
- 7.2 dfp.admin.inc \dfp_target_form_validate()
Validation function used by an individual target in the targeting form.
1 string reference to 'dfp_target_form_validate'
- _dfp_target_form in ./
dfp.admin.inc - Helper form builder for an individual target.
File
- ./
dfp.admin.inc, line 302 - Admin forms and functinality for DFP ads.
Code
function dfp_target_form_validate($element, &$form_state) {
if (empty($element['target']['#value']) && !empty($element['value']['#value'])) {
form_error($element['target'], t('The target cannot be empty if a value exists.'));
}
elseif (!empty($element['target']['#value']) && empty($element['value']['#value'])) {
form_error($element['value'], t('The value cannot be empty if a target exists.'));
}
}