You are here

function optimizely_setup_form_validate in Optimizely 7

Same name and namespace in other branches
  1. 6 optimizely.module \optimizely_setup_form_validate()

Validation for settigns form. Verify that the account ID is numeric

File

./optimizely.module, line 95
Optimizely module

Code

function optimizely_setup_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.'));
  }
}