function ajax_example_dynamic_sections_validate

Validation function for ajax_example_dynamic_sections().

Related topics

File

ajax_example/ajax_example_graceful_degradation.inc, line 287

Code

function ajax_example_dynamic_sections_validate($form, &$form_state) {
    $answer = $form_state['values']['question'];
    if ($answer !== t('George Washington')) {
        form_set_error('question', t('Wrong answer. Try again. (Hint: The right answer is "George Washington".)'));
    }
}