function ip_ban_validate in IP Ban 8
Same name and namespace in other branches
- 7 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.
2 string references to 'ip_ban_validate'
- IpBanAdmin::buildForm in src/
IpBanAdmin.php - ip_ban_admin in ./
ip_ban.admin.inc - Ip_ban admin form.
File
- ./
ip_ban.admin.inc, line 139 - Administration functions for the IP Ban module.
Code
function ip_ban_validate($form, &$form_state) {
_ip_ban_validate_paths('ip_ban_readonly_path', Html::escape($form_state['values']['ip_ban_readonly_path']));
_ip_ban_validate_paths('ip_ban_completeban_path', Html::escape($form_state['values']['ip_ban_completeban_path']));
_ip_ban_validate_ips('ip_ban_additional_ips', Html::escape($form_state['values']['ip_ban_additional_ips']));
_ip_ban_validate_ips('ip_ban_readonly_ips', Html::escape($form_state['values']['ip_ban_readonly_ips']));
_ip_ban_validate_ips('ip_ban_test_ip', Html::escape($form_state['values']['ip_ban_test_ip']));
}