You are here

function optimizely_account_settings_form_validate in Optimizely 7.2

Same name and namespace in other branches
  1. 7.3 optimizely.admin.inc \optimizely_account_settings_form_validate()

Validation for optimizely_account_settings_form form

File

./optimizely.admin.inc, line 319
Admin page callback for the Optimizely module.

Code

function optimizely_account_settings_form_validate($form, &$form_state) {
  if (!preg_match('/^\\d+$/', $form_state['values']['optimizely_id'])) {
    form_set_error('optimizely_id', t('Your Optimizely ID should be numeric.'));
  }
}