Index: trunk/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r3086 -r3088 --- trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 3086) +++ trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 3088) @@ -589,11 +589,17 @@ function HasError($params) { - if ($params['field'] == 'any') { - $object =& $this->Application->recallObject($this->getPrefixSpecial()); - return $object->HasErrors($params); + if ($params['field'] == 'any') + { + $object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, $params ); + + $skip_fields = getArrayValue($params, 'except'); + $skip_fields = $skip_fields ? explode(',', $skip_fields) : Array(); + + return $object->HasErrors($skip_fields); } - else { + else + { $fields = $this->SelectParam($params, 'field,fields'); $fields = explode(',', $fields); $res = false; Index: trunk/core/kernel/db/dbitem.php =================================================================== diff -u -r3086 -r3088 --- trunk/core/kernel/db/dbitem.php (.../dbitem.php) (revision 3086) +++ trunk/core/kernel/db/dbitem.php (.../dbitem.php) (revision 3088) @@ -427,16 +427,19 @@ return true; } - function HasErrors($params = Array()) + /** + * Check if item has errors + * + * @param Array $skip_fields fields to skip during error checking + * @return bool + */ + function HasErrors($skip_fields) { $global_res = false; - if($skip_fields = getArrayValue($params, 'except')) - { - if(!is_array($skip_fields)) $skip_fields = explode(',', $skip_fields); - } + foreach ($this->Fields as $field => $field_params) { // If Formatter has set some error messages during values parsing - if ( !(is_array($skip_fields) && in_array($field, $skip_fields) ) && + if ( !( in_array($field, $skip_fields) ) && isset($this->FieldErrors[$field]['pseudo']) && $this->FieldErrors[$field] != '') { $global_res = true; } Index: trunk/kernel/units/users/users_tag_processor.php =================================================================== diff -u -r3086 -r3088 --- trunk/kernel/units/users/users_tag_processor.php (.../users_tag_processor.php) (revision 3086) +++ trunk/kernel/units/users/users_tag_processor.php (.../users_tag_processor.php) (revision 3088) @@ -158,7 +158,7 @@ $res = parent::HasError($params); if($this->SelectParam($params,'field,fields') == 'any') { - $res = $res || $this->Application->GetVar('MustAgreeToTerms'); + $res = $res || $this->Application->GetVar('MustAgreeToTerms'); // need to do it not put module fields into kernel ! (noticed by Alex) $res = $res || $this->Application->GetVar('SSNRequiredError'); } return $res; Index: trunk/core/units/users/users_tag_processor.php =================================================================== diff -u -r3086 -r3088 --- trunk/core/units/users/users_tag_processor.php (.../users_tag_processor.php) (revision 3086) +++ trunk/core/units/users/users_tag_processor.php (.../users_tag_processor.php) (revision 3088) @@ -158,7 +158,7 @@ $res = parent::HasError($params); if($this->SelectParam($params,'field,fields') == 'any') { - $res = $res || $this->Application->GetVar('MustAgreeToTerms'); + $res = $res || $this->Application->GetVar('MustAgreeToTerms'); // need to do it not put module fields into kernel ! (noticed by Alex) $res = $res || $this->Application->GetVar('SSNRequiredError'); } return $res;