HTML_QuickForm::setElementError() – Set error message for a form element


require_once 'HTML/QuickForm.php';

void HTML_QuickForm::setElementError ( string $element , string $message )


Set error message for a form element. Errors are usually assigned to elements by validate() method. Use this if you need to explicitly set error message for an element.


string $element

Name of form element to set error for

string $message

Error message


throws no exceptions thrown


since 1.0

This function can not be called statically.

Returns error corresponding to validated element (Previous) Registers a new validation rule (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.