You are here

function apachesolr_facet_form_validate in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 apachesolr.module \apachesolr_facet_form_validate()
  2. 7 apachesolr.module \apachesolr_facet_form_validate()

Validation function for the Facet API facet settings form.

Apache Solr does not support the combination of OR facets and facet missing, so catch that at validation.

1 string reference to 'apachesolr_facet_form_validate'
ApacheSolrFacetapiAdapter::settingsForm in plugins/facetapi/adapter.inc
Allows for backend specific overrides to the settings form.

File

./apachesolr.module, line 1825
Integration with the Apache Solr search application.

Code

function apachesolr_facet_form_validate($form, &$form_state) {
  if ($form_state['values']['global']['operator'] == FACETAPI_OPERATOR_OR && $form_state['values']['global']['facet_missing']) {
    form_set_error('operator', t('Apache Solr does not support <em>facet missing</em> in combination with the OR operator.'));
  }
}