You are here

function beautytips_manager_admin_validate in BeautyTips 6.2

Validation callback for beautytips manager admin form.

File

./beautytips_manager.module, line 263

Code

function beautytips_manager_admin_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)."));
    }
  }
}