function _subscriptions_content_validate_blocked_nodes in Subscriptions 7
Same name and namespace in other branches
- 5.2 subscriptions_content.module \_subscriptions_content_validate_blocked_nodes()
- 6 subscriptions_content.module \_subscriptions_content_validate_blocked_nodes()
- 2.0.x subscriptions_content/subscriptions_content.admin.inc \_subscriptions_content_validate_blocked_nodes()
Validates the 'subscriptions_blocked_nodes' input.
_state
Parameters
array $form:
1 string reference to '_subscriptions_content_validate_blocked_nodes'
File
- ./
subscriptions_content.admin.inc, line 97 - Subscriptions Content module (admin functions).
Code
function _subscriptions_content_validate_blocked_nodes(array $form, array $form_state) {
$form_values = $form_state['values'];
$values = $form_values['subscriptions_blocked_nodes'];
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;
}
}
}
}