You are here

function _subscriptions_content_validate_blocked_nodes in Subscriptions 5.2

Same name and namespace in other branches
  1. 6 subscriptions_content.module \_subscriptions_content_validate_blocked_nodes()
  2. 7 subscriptions_content.admin.inc \_subscriptions_content_validate_blocked_nodes()
  3. 2.0.x subscriptions_content/subscriptions_content.admin.inc \_subscriptions_content_validate_blocked_nodes()

Validate the 'subscriptions_blocked_nodes' input.

File

./subscriptions_content.module, line 603
Subscriptions to content events

Code

function _subscriptions_content_validate_blocked_nodes($form_id, $form_values, $form) {
  $values = $form['content']['subscriptions_blocked_nodes']['#value'];
  if (!empty($values)) {
    $values = explode(' ', $values);
    foreach ($values as $v) {
      if (!empty($v) && !is_numeric($v)) {
        form_set_error('subscriptions_blocked_nodes', t('Enter a series of numbers, separated by spaces.'));
        break;
      }
    }
  }
}