function protected_pages_validate_integer_positive in Protected Pages 7.2
Same name and namespace in other branches
- 7 protected_pages.admin.inc \protected_pages_validate_integer_positive()
Callback function to validate session expire time value.
1 string reference to 'protected_pages_validate_integer_positive'
- protected_pages_settings in ./
protected_pages.admin.inc - Callback function for protected pages settings.
File
- ./
protected_pages.admin.inc, line 500 - Provides page callbacks for configuration page.
Code
function protected_pages_validate_integer_positive($element, &$form_state) {
$value = $element['#value'];
if ($value !== '' && (!is_numeric($value) || intval($value) != $value || $value < 0)) {
form_error($element, t('%name must be a positive integer.', array(
'%name' => $element['#title'],
)));
}
}