Index: branches/RC/core/kernel/db/dblist.php =================================================================== diff -u -r8929 -r9033 --- branches/RC/core/kernel/db/dblist.php (.../dblist.php) (revision 8929) +++ branches/RC/core/kernel/db/dblist.php (.../dblist.php) (revision 9033) @@ -905,6 +905,30 @@ return $ret; } + + /** + * Set's field error, if pseudo passed not found then create it with message text supplied. + * Don't owerrite existing pseudo translation. + * + * @param string $field + * @param string $pseudo + * @param string $error_label + */ + function SetError($field, $pseudo, $error_label = null, $error_params = null) + { + $error_field = isset($this->Fields[$field]['error_field']) ? $this->Fields[$field]['error_field'] : $field; + $this->FieldErrors[$error_field]['pseudo'] = $pseudo; + + $var_name = $this->getPrefixSpecial().'_'.$field.'_error'; + $previous_pseudo = $this->Application->RecallVar($var_name); + + if ($previous_pseudo) { + // don't set more then one error on field + return ; + } + + $this->Application->StoreVar($var_name, $pseudo); + } } ?> \ No newline at end of file