function globallink_validate_project_director_details in GlobalLink Connect for Drupal 7.5
Same name and namespace in other branches
- 7.7 globallink_settings.inc \globallink_validate_project_director_details()
- 7.6 globallink_settings.inc \globallink_validate_project_director_details()
Validates project director details.
Parameters
object $pd4: The project director object.
Return value
bool TRUE if the project director details are valid. FALSE otherwise.
32 calls to globallink_validate_project_director_details()
- globallink_block_active_form_validate in globallink_block/
globallink_block_active_submissions.inc - Validates form actions for active block submissions.
- globallink_block_dashboard_form_validate in globallink_block/
globallink_block_send.inc - Validates block form input.
- globallink_block_receive_form in globallink_block/
globallink_block_receive.inc - Builds form to receive a block submission.
- globallink_block_receive_form_validate in globallink_block/
globallink_block_receive.inc - Validates block form input.
- globallink_dashboard_active_validate in ./
globallink_active_submissions.inc - Validates form actions for active GlobalLink submissions.
File
- ./
globallink_settings.inc, line 471
Code
function globallink_validate_project_director_details($pd4) {
if (empty($pd4->url)) {
form_set_error('', t('GlobalLink URL is undefined.'));
return FALSE;
}
elseif (empty($pd4->username)) {
form_set_error('', t('GlobalLink User Id is undefined.'));
return FALSE;
}
elseif (empty($pd4->password)) {
form_set_error('', t('GlobalLink Password is undefined.'));
return FALSE;
}
elseif (empty($pd4->projectShortCode)) {
form_set_error('', t('GlobalLink Project Code is undefined.'));
return FALSE;
}
elseif (empty($pd4->classifier)) {
form_set_error('', t('GlobalLink Classifier is undefined.'));
return FALSE;
}
elseif (empty($pd4->maxTargetCount)) {
form_set_error('', t('GlobalLink Max Target Count is undefined.'));
return FALSE;
}
elseif (!is_numeric($pd4->maxTargetCount)) {
form_set_error('', t('GlobalLink Max Target Count is not a number.'));
return FALSE;
}
return TRUE;
}