You are here

function vTicker_numeric_element_validate in Views Ticker 7

Same name and namespace in other branches
  1. 6.2 includes/views_ticker_style_plugin.inc \vTicker_numeric_element_validate()
  2. 7.2 includes/views_ticker_style_plugin.inc \vTicker_numeric_element_validate()
1 string reference to 'vTicker_numeric_element_validate'
views_ticker_style_plugin::options_form in includes/views_ticker_style_plugin.inc
Provide a form to edit options for this plugin.

File

includes/views_ticker_style_plugin.inc, line 270
Contains the views ticker style plugin.

Code

function vTicker_numeric_element_validate($element, &$form_state) {
  if (!is_numeric($element['#value']) || $element['#value'] <= 0) {
    form_error($element, t('Enter a positive number'));
  }
}