function _honeypot_honeypot_validate in Honeypot 7
Same name and namespace in other branches
- 8 honeypot.module \_honeypot_honeypot_validate()
- 6 honeypot.module \_honeypot_honeypot_validate()
- 2.0.x honeypot.module \_honeypot_honeypot_validate()
Validate honeypot field.
1 string reference to '_honeypot_honeypot_validate'
- honeypot_add_form_protection in ./
honeypot.module - Form builder function to add different types of protection to forms.
File
- ./
honeypot.module, line 288 - Honeypot module, for deterring spam bots from completing Drupal forms.
Code
function _honeypot_honeypot_validate($element, &$form_state) {
// Get the honeypot field value.
$honeypot_value = $element['#value'];
// Make sure it's empty.
if (!empty($honeypot_value) || $honeypot_value == '0') {
_honeypot_log($form_state['values']['form_id'], 'honeypot');
form_set_error('', t('There was a problem with your form submission. Please refresh the page and try again.'));
}
}