You are here

function _login_security_valid_integer in Login Security 7

Same name and namespace in other branches
  1. 6 login_security.admin.inc \_login_security_valid_integer()

Verify that element is a positive integer value.

1 string reference to '_login_security_valid_integer'
login_security_admin_settings in ./login_security.admin.inc
Build a form body for the configuration settings.

File

./login_security.admin.inc, line 199
login_security.menu.inc

Code

function _login_security_valid_integer($element, &$form_state) {
  if (!ctype_alnum($element['#value']) || intval($element['#value']) < 0) {
    form_error($element, t('The @field field should be a positive integer value greater than or equal to 0.', array(
      '@field' => $element['#title'],
    )));
  }
}