Same name and namespace in other branches
- 4.6.x includes/common.inc \form_get_errors()
- 4.7.x includes/form.inc \form_get_errors()
- 5.x includes/form.inc \form_get_errors()
- 6.x includes/form.inc \form_get_errors()
Returns an associative array of all errors if any.
Return value
array|null The form errors if any, NULL otherwise.
Related topics
10 calls to form_get_errors()
- comment_preview in modules/
comment/ comment.module - Generate a comment preview.
- drupal_process_form in includes/
form.inc - Processes a form submission.
- FormsElementsTableSelectFunctionalTest::formSubmitHelper in modules/
simpletest/ tests/ form.test - Helper function for the option check test to submit a form while collecting errors.
- FormsProgrammaticTestCase::submitForm in modules/
simpletest/ tests/ form.test - Helper function used to programmatically submit the form defined in form_test.module with the given values.
- FormsTestCase::testRequiredFields in modules/
simpletest/ tests/ form.test - Check several empty values for required forms elements.
File
- includes/
form.inc, line 1690 - Functions for form and batch generation and processing.
Code
function form_get_errors() {
$form = form_set_error();
if (!empty($form)) {
return $form;
}
}