function botcha_form_id_validate in BOTCHA Spam Prevention 6.2
2 string references to 'botcha_form_id_validate'
- Botcha::getAdminForm in controller/
botcha.controller.inc - botcha_recipebook_form in ./
botcha.admin.inc - Edit existent or add a new recipe book.
File
- ./
botcha.admin.inc, line 138 - Implementation of botcha administration forms.
Code
function botcha_form_id_validate($element, &$form_state) {
$value = $element['#value'];
// @todo ?Is it correct way to check if the form is protected?
if (!Botcha::getForm($value, FALSE)
->getRecipebook() instanceof BotchaRecipebookNone) {
form_set_error('botcha_form_id', t('Form %form_id is already protected by BOTCHA', array(
'%form_id' => $value,
)));
}
}