You are here

function scale_collection_form_validate in Quiz 6.6

Same name and namespace in other branches
  1. 8.6 question_types/quiz_scale/quiz_scale.module \scale_collection_form_validate()
  2. 8.4 question_types/scale/scale.module \scale_collection_form_validate()
  3. 8.5 question_types/quiz_scale/quiz_scale.module \scale_collection_form_validate()
  4. 6.4 question_types/scale/scale.module \scale_collection_form_validate()
  5. 7.6 question_types/scale/scale.module \scale_collection_form_validate()
  6. 7 question_types/scale/scale.module \scale_collection_form_validate()
  7. 7.4 question_types/scale/scale.module \scale_collection_form_validate()
  8. 7.5 question_types/scale/scale.module \scale_collection_form_validate()

Validates the scale collection form

_state

Parameters

$form:

Return value

unknown_type

1 string reference to 'scale_collection_form_validate'
scale_manage_collection_form in question_types/scale/scale.module
Form for changing and deleting the current users question types.

File

question_types/scale/scale.module, line 288
The main file for scale.

Code

function scale_collection_form_validate($form, &$form_state) {
  if (strlen($form_state['values']['collectionnew']['alternative0']) > 0) {
    if (strlen($form_state['values']['collectionnew']['alternative1']) == 0) {
      form_set_error('collectionnew][alternative1', t('New preset must have atleast two alternatives.'));
    }
  }
}