You are here

function google_appliance_admin_settings_validate in Google Search Appliance 5

Same name and namespace in other branches
  1. 6.2 google_appliance.module \google_appliance_admin_settings_validate()
  2. 7 google_appliance.admin.inc \google_appliance_admin_settings_validate()

Validation function, though it's actually getting overridden by the #required fields...

File

./google_appliance.module, line 222
GSA integration

Code

function google_appliance_admin_settings_validate($form_id, $form) {
  if (empty($form['google_appliance_host_name'])) {
    form_set_error('google_appliance_host_name', t('Please enter your host name or IP address.'));
  }
  if (empty($form['google_appliance_collection'])) {
    form_set_error('google_appliance_collection', t('Please enter the name of the collection you want to search.'));
  }
  if (empty($form['google_appliance_client'])) {
    form_set_error('google_appliance_client', t('Please enter name of the client frontend you are searching.'));
  }
  if (empty($form['google_appliance_name'])) {
    form_set_error('google_appliance_name', t('Please enter the name of this search, to appear as sub-navigation on the search page.'));
  }
}