function views_plugin_display_i18n_page::options_validate in i18n page views 6.0
Same name and namespace in other branches
- 6 views_plugin_display_i18n_page.inc \views_plugin_display_i18n_page::options_validate()
- 7 views_plugin_display_i18n_page.inc \views_plugin_display_i18n_page::options_validate()
File
- ./
views_plugin_display_i18n_page.inc, line 163 - Contains the i18n page display plugin.
Class
- views_plugin_display_i18n_page
- The plugin that handles a full page.
Code
function options_validate(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_validate($form, $form_state);
$key = $form_state['section'];
if (stristr($key, 'path_') === FALSE) {
return;
}
if (strpos($form_state['values'][$key], '$arg') !== FALSE) {
form_error($form[$key], t('"$arg" is no longer supported. Use % instead.'));
}
if (strpos($form_state['values'][$key], '%') === 0) {
form_error($form[$key], t('"%" may not be used for the first segment of a path.'));
}
// automatically remove '/' from path.
$form_state['values'][$key] = trim($form_state['values'][$key], '/');
}