function _configuration_validate_form in Configuration Management 6
Custom implementation of drupal_validate_form()
Removed static variable that prevented same form_id to be validated more then once during a single page request
1 call to _configuration_validate_form()
- _configuration_process_form in ./
configuration.module - Custom implementation of drupal_process_form()
File
- ./
configuration.module, line 1890 - Provide a unified method for defining site configurations abstracted from their data format. Various data formats should be supported via a plugin architecture such as XML, YAML, JSON, PHP
Code
function _configuration_validate_form($form_id, $form, &$form_state) {
// If the session token was set by drupal_prepare_form(), ensure that it
// matches the current user's session.
if (isset($form['#token'])) {
if (!drupal_valid_token($form_state['values']['form_token'], $form['#token'])) {
// Setting this error will cause the form to fail validation.
form_set_error('form_token', t('Validation error, please try again. If this error persists, please contact the site administrator.'));
}
}
_form_validate($form, $form_state, $form_id);
}