function action_example_node_sticky_action_validate in Examples for Developers 7
Validates settings form for action_example_node_sticky_action().
Verifies that user exists before continuing.
Related topics
File
- action_example/
action_example.module, line 313 - Action definition example module.
Code
function action_example_node_sticky_action_validate($form, $form_state) {
if (!($account = user_load_by_name($form_state['values']['author']))) {
form_set_error('author', t('Please, provide a valid username'));
}
}