1 block.text.inc | BlockText::formValidate($form, &$form_state) |
Validates the form settings.
Overrides Block::formValidate
File
- core/
modules/ layout/ includes/ block.text.inc, line 138
Class
- BlockText
- BlockText extends Block
Code
function formValidate($form, &$form_state) {
parent::formValidate($form, $form_state);
if (module_exists('block')) {
$admin_label = trim($form_state['values']['admin_label']);
$delta = trim($form_state['values']['delta']);
if ($form_state['values']['reusable']) {
if (empty($admin_label)) {
form_error($form['admin_label']['admin_label'], t('Admin label is required when making a block reusable.'));
}
elseif (empty($delta)) {
form_error($form['admin_label']['delta'], t('An internal name is required when making a block reusable.'));
}
}
}
}