Index: branches/RC/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r8929 -r9033 --- branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 8929) +++ branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 9033) @@ -1651,15 +1651,17 @@ { $field = $this->SelectParam($params, 'field,name'); - $error_var_name = $this->getPrefixSpecial().'_'.$field.'_'.$params['type'].'_error'; - $error_msg = $this->Application->RecallVar($error_var_name); - if($error_msg) - { - $this->Application->StoreVar($error_var_name, ''); + $error_var_name = $this->getPrefixSpecial().'_'.$field.'_error'; + $pseudo = $this->Application->RecallVar($error_var_name); + if ($pseudo) { + $this->Application->RemoveVar($error_var_name); } $object =& $this->Application->recallObject($this->Prefix.'.'.$this->Special.'-item', null, Array('skip_autoload' => true)); - return $object->ErrorMsgs[$error_msg]; + /* @var $object kDBItem */ + + $object->SetError($field, $pseudo); + return $object->GetErrorMsg($field, false); } /** 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