You are here

function jquerymobile_admin_local_settings_validate in jQuery Mobile module 7.2

Validate the local admin settings.

1 string reference to 'jquerymobile_admin_local_settings_validate'
jquerymobile_admin_local_settings in ./jquerymobile.admin.inc
Create the admin local settings form.

File

./jquerymobile.admin.inc, line 292
Admin settings for the jquerymobile module.

Code

function jquerymobile_admin_local_settings_validate($form, &$form_state, $theme = NULL) {
  if (!is_numeric($form_state['values']['minScrollBack'])) {
    form_set_error('minScrollBack', t('The value') . ' <i>minScrollBack</i> ' . t('must be a number.'));
  }
  if (is_null($form_state['values']['subPageUrlKey']) || $form_state['values']['subPageUrlKey'] == '') {
    form_set_error('subPageUrlKey', t('The value of') . ' <i>subPageUrlKey</i> ' . t('must not be null.'));
  }
  if (is_null($form_state['values']['activePageClass']) || $form_state['values']['activePageClass'] == '') {
    form_set_error('activePageClass', t('The value of') . ' <i>activePageClass</i> ' . t('must not be null.'));
  }
  if (is_null($form_state['values']['activeBtnClass']) || $form_state['values']['activeBtnClass'] == '') {
    form_set_error('activeBtnClass', t('The value of') . ' <i>activeBtnClass</i> ' . t('must not be null.'));
  }
  if (is_null($form_state['values']['loadingMessage']) || $form_state['values']['loadingMessage'] == '') {
    form_set_error('loadingMessage', t('The value of') . ' <i>loadingMessage</i> ' . t('must not be null.'));
  }
  if (is_null($form_state['values']['pageLoadErrorMessage']) || $form_state['values']['pageLoadErrorMessage'] == '') {
    form_set_error('pageLoadErrorMessage', t('The value of') . ' <i>pageLoadErrorMessage</i> ' . t('must not be null.'));
  }
}