You are here

function hsts_admin_settings_form_validate in HTTP Strict Transport Security 6

Same name and namespace in other branches
  1. 7 hsts.admin.inc \hsts_admin_settings_form_validate()

Implements hook_validate().

_state

Parameters

$form:

File

./hsts.admin.inc, line 53
Admininstrative forms for hsts module.

Code

function hsts_admin_settings_form_validate($form, &$form_state) {
  if (!is_numeric($form_state['values']['hsts_max_age']) || intval($form_state['values']['hsts_max_age']) < 0) {
    form_set_error('hsts_max_age', t('Value is not a number or out of bounds.'));
  }
}