You are here

function ip_ban_validate in IP Ban 7

Same name and namespace in other branches
  1. 8 ip_ban.admin.inc \ip_ban_validate()

Custom form validation function.

Custom form validation function simply calls internal function to reduce code duplication since we're checking for the same issue in two different instances.

1 string reference to 'ip_ban_validate'
ip_ban_admin in ./ip_ban.admin.inc
Ip_ban admin form.

File

./ip_ban.admin.inc, line 125
Administration functions for the IP Ban module.

Code

function ip_ban_validate($form, &$form_state) {
  _ip_ban_validate_paths('ip_ban_readonly_path', check_plain($form_state['values']['ip_ban_readonly_path']));
  _ip_ban_validate_paths('ip_ban_completeban_path', check_plain($form_state['values']['ip_ban_completeban_path']));
  _ip_ban_validate_ips('ip_ban_additional_ips', check_plain($form_state['values']['ip_ban_additional_ips']));
  _ip_ban_validate_ips('ip_ban_readonly_ips', check_plain($form_state['values']['ip_ban_readonly_ips']));
  _ip_ban_validate_ips('ip_ban_test_ip', check_plain($form_state['values']['ip_ban_test_ip']));
}