function flag_actions_form_validate in Flag 6
Same name and namespace in other branches
- 6.2 flag_actions.module \flag_actions_form_validate()
- 7.3 flag_actions.module \flag_actions_form_validate()
- 7.2 flag_actions.module \flag_actions_form_validate()
Generic submit handler for validating flag actions.
File
- ./
flag_actions.module, line 447 - Actions support for the Flag module.
Code
function flag_actions_form_validate($form, &$form_state) {
// Special validation handlers may be needed to save this form properly.
// Try to load the action's validation routine if needed.
$callback = $form_state['values']['flag']['callback'];
$validate_function = $callback . '_validate';
if (function_exists($validate_function)) {
$validate_function($form, $form_state);
}
}