You are here

public function FeedsExcelParser::configFormValidate in Feeds Excel 7

Same name and namespace in other branches
  1. 6 ExcelParser.inc \FeedsExcelParser::configFormValidate()

Validate rows and columns input in ConfigForm.

File

./ExcelParser.inc, line 424

Class

FeedsExcelParser
Parses a given file as a Excel file.

Code

public function configFormValidate(&$values) {

  // Check valid range formats.
  $range_fields = array(
    'iterative',
    'fixed',
    'header',
  );
  foreach ($range_fields as $field) {
    if ($values[$field]) {
      $range = new ExcelRange($values[$field]);
      if (!$range
        ->converted_all_ranges()) {
        form_set_error($field, t('The range expression could not be completely converted in a valid range format.'));
      }
    }
  }
}