You are here

public function FuzzysearchSearch::configurationFormValidate in Fuzzy Search 7

Validate the processor configuration form values.

Parameters

array $form: The form array.

array $values: The form values to validate.

array $form_state: The form state.

Overrides SearchApiAbstractProcessor::configurationFormValidate

File

includes/processor_search.inc, line 85

Class

FuzzysearchSearch
Processor to set the index and search settings. Requires FuzzySearchService.

Code

public function configurationFormValidate(array $form, array &$values, array &$form_state) {
  if (!is_numeric($values['completeness']) || $values['completeness'] < 0 || $values['completeness'] > 100) {
    form_error($form['completeness'], t('The Fuzzy Search processor completeness setting must use a numeric value between 0 and 100.'));
  }
}