function uc_fedex_admin_settings_validate in FedEx Shipping 5
Same name and namespace in other branches
- 6.2 uc_fedex.admin.inc \uc_fedex_admin_settings_validate()
- 6 uc_fedex.module \uc_fedex_admin_settings_validate()
- 7.2 uc_fedex.admin.inc \uc_fedex_admin_settings_validate()
- 7 uc_fedex.module \uc_fedex_admin_settings_validate()
Validation handler for uc_fedex_admin_settings form.
Require password only if it hasn't been set.
Parameters
form_id: Form identifier
form_value: Values entered into form
form: Form itself
File
- ./
uc_fedex.module, line 391 - FedEx Web Services Rate / Available Services Quote
Code
function uc_fedex_admin_settings_validate($form_id, $form_values, $form) {
$old_password = variable_get('uc_fedex_user_credential_password', '');
if (!$form_values['uc_fedex_user_credential_password']) {
if ($old_password) {
form_set_value($form['uc_fedex_user_credential_password'], $old_password);
}
else {
form_set_error('uc_fedex_user_credential_password', t('Password field is required.'));
}
}
}