node_admin_nodes_validate

function node_admin_nodes_validate

node_admin_nodes_validate($form, &$form_state)

Validate node_admin_nodes form submissions.

Checks whether any nodes have been selected to perform the chosen 'Update option' on.

See also

node_admin_nodes()

node_admin_nodes_submit()

node_filter_form()

node_filter_form_submit()

node_multiple_delete_confirm()

node_multiple_delete_confirm_submit()

File

modules/node/node.admin.inc, line 616
Content administration and module settings UI.

Code

function node_admin_nodes_validate($form, &$form_state) {
  // Error if there are no items to select.
  if (!is_array($form_state['values']['nodes']) || !count(array_filter($form_state['values']['nodes']))) {
    form_set_error('', t('No items selected.'));
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!node!node.admin.inc/function/node_admin_nodes_validate/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部