function views_plugin_row_rss_fields::validate
Overrides views_plugin::validate
File
-
plugins/
views_plugin_row_rss_fields.inc, line 103
Class
- views_plugin_row_rss_fields
- Renders an RSS item based on fields.
Code
public function validate() {
$errors = parent::validate();
$required_options = array(
'title_field',
'link_field',
'description_field',
'creator_field',
'date_field',
);
foreach ($required_options as $required_option) {
if (empty($this->options[$required_option])) {
$errors[] = t('Row style plugin requires specifying which views fields to use for RSS item.');
break;
}
}
// Once more for guid.
if (empty($this->options['guid_field_options']['guid_field'])) {
$errors[] = t('Row style plugin requires specifying which views fields to use for RSS item.');
}
return $errors;
}