function 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

12 calls to form_get_errors()
block_admin_configure_submit in modules/block/block.admin.inc
Form submission handler for block_admin_configure().
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.

... See full list

File

includes/form.inc, line 1690

Code

function form_get_errors() {
    $form = form_set_error();
    if (!empty($form)) {
        return $form;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.