diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-23 12:33:13 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-23 12:33:13 +0000 |
commit | de79420bc9b448169d61c8c70a6155060502f6a0 (patch) | |
tree | f14946a4e30672a475bf510de40172d34facb1ee /includes | |
parent | ac4c8f7ab019f2b6d77e2718a0bda0a1c6a4bd23 (diff) | |
download | brdo-de79420bc9b448169d61c8c70a6155060502f6a0.tar.gz brdo-de79420bc9b448169d61c8c70a6155060502f6a0.tar.bz2 |
#195176 by chx: form_set_error doxygen was misleading
Diffstat (limited to 'includes')
-rw-r--r-- | includes/form.inc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/includes/form.inc b/includes/form.inc index 882e36f91..7b9d119e8 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -739,9 +739,18 @@ function form_execute_handlers($type, &$form, &$form_state) { } /** - * File an error against a form element. If the name of the element is - * edit[foo][bar] then you may pass either foo or foo][bar as $name - * foo will set an error for all its children. + * File an error against a form element. + * + * @param $name + * The name of the form element. If the #parents property of your form + * element is array('foo', 'bar', 'baz') then you may set an error on 'foo' + * or 'foo][bar][baz'. Setting an error on 'foo' sets an error for every + * element where the #parents array starts with 'foo'. + * @param $message + * The error message to present to the user. + * @return + * Never use the return value of this function, use form_get_errors and + * form_get_error instead. */ function form_set_error($name = NULL, $message = '') { static $form = array(); |