You are here

public function FeedsQueryPathParser::sourceFormValidate in Feeds QueryPath Parser 6

Same name and namespace in other branches
  1. 7 FeedsQueryPathParser.inc \FeedsQueryPathParser::sourceFormValidate()

Override parent::sourceFormValidate().

Simply trims all values from the form. That way when testing them later we can be sure that there aren't any strings with spaces in them.

Parameters

&$values: The values from the form to validate, passed by reference.

Overrides FeedsPlugin::sourceFormValidate

1 call to FeedsQueryPathParser::sourceFormValidate()
FeedsQueryPathParser::configFormValidate in ./FeedsQueryPathParser.inc
Validation handler for configForm().

File

./FeedsQueryPathParser.inc, line 244
Provides the class for FeedsQueryPathParser.

Class

FeedsQueryPathParser
@file

Code

public function sourceFormValidate(&$values) {
  $values['context'] = trim($values['context']);
  foreach ($values['sources'] as &$query) {
    $query = trim($query);
  }
  foreach ($values['attrs'] as &$attr) {
    $attr = trim($attr);
  }
}