1 layout.flexible.inc layout_flexible_template_edit_row_validate($form, &$form_state)

Validation handler for layout_flexible_template_edit_row_form().

File

core/modules/layout/layout.flexible.inc, line 633
Provides configurable (flexible) layout templates.

Code

function layout_flexible_template_edit_row_validate($form, &$form_state) {
  $last_region_number = layout_flexible_template_get_last_region_number($form_state['flexible_template'], $form_state);

  foreach ($form_state['values']['region_names'] as $key => $region_name) {
    if (empty($region_name)) {
      $form_state['values']['region_names'][$key] = t('Region') . ' ' . ($last_region_number + $key + 1);
      $last_region_number++;
    }
  }
}