Form element validation handler for 'value' element in form_test_storage_form().
Tests updating of cached form storage during validation.
function form_test_storage_element_validate_value_cached($element, &$form_state) {
// If caching is enabled and we receive a certain value, change the storage.
// This presumes that another submitted form value triggers a validation error
// elsewhere in the form. Form API should still update the cached form storage
// though.
if (isset($_REQUEST['cache']) && $form_state['values']['value'] == 'change_title') {
$form_state['storage']['thing']['changed'] = TRUE;
}
}