You are here

function beautytips_manager_custom_tips_form_validate in BeautyTips 7.2

Validation callback for beautytips manager custom tips form.

File

./beautytips_manager.admin.inc, line 273
Administration pages and forms for beautytips manager.

Code

function beautytips_manager_custom_tips_form_validate($form, &$form_state) {

  // TODO: Validate?
  $positions = $form_state['values']['tip']['positions'];
  foreach ($positions as $position => $order) {
    if ($order !== '' && !is_numeric($order)) {
      form_set_error("tip][positions][{$position}", t("You must enter a numeric value for position order (Or leave it blank)."));
    }
  }
}