改进model的validate方法

This commit is contained in:
thinkphp
2016-03-20 11:04:41 +08:00
parent c323f5e255
commit fa9eae4a26
3 changed files with 12 additions and 5 deletions

View File

@@ -376,6 +376,8 @@ class Loader
$class = str_replace('\\' . $module . '\\', '\\' . COMMON_MODULE . '\\', $class);
if (class_exists($class)) {
$validate = new $class;
} else {
throw new Exception('class [ ' . $class . ' ] not exists', 10001);
}
}
$_instance[$name . $layer] = $validate;