You are here

function botcha_recipebook_id_validate in BOTCHA Spam Prevention 6.2

File

./botcha.admin.inc, line 297
Implementation of botcha administration forms.

Code

function botcha_recipebook_id_validate($element, $form_state) {
  $value = $element['#value'];
  if (!Botcha::getRecipebook($value, FALSE) instanceof BotchaRecipebookNone) {
    form_set_error('id', t('Recipe book %rbid already exists', array(
      '%rbid' => $value,
    )));
  }
}