Index: trunk/core/kernel/db/dbitem.php =================================================================== diff -u -r2711 -r2787 --- trunk/core/kernel/db/dbitem.php (.../dbitem.php) (revision 2711) +++ trunk/core/kernel/db/dbitem.php (.../dbitem.php) (revision 2787) @@ -388,6 +388,7 @@ $res = $res && $this->ValidateRange($field, $params); $res = $res && $this->ValidateUnique($field, $params); $res = $res && $this->ValidateRequired($field, $params); + $res = $res && $this->CustomValidation($field, $params); // If Formatter has set some error messages during values parsing $error_field = isset($params['error_field']) ? $params['error_field'] : $field; @@ -410,6 +411,18 @@ return $global_res; } + /** + * Check field value by user-defined alghoritm + * + * @param string $field field name + * @param Array $params field options from config + * @return bool + */ + function CustomValidation($field, $params) + { + return true; + } + function HasErrors() { $global_res = false;