diff --git a/library/think/Validate.php b/library/think/Validate.php index ed772d95..69081dab 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -11,6 +11,7 @@ namespace think; +use think\Exception; use think\Input; use think\Request; @@ -1107,4 +1108,14 @@ class Validate } return $scene; } + + public static function __callStatic($method, $params) + { + $class = new static; + if (method_exists($class, $method)) { + return call_user_func_array([$class, $method], $params); + } else { + throw new Exception(__CLASS__ . ':' . $method . ' method not exist'); + } + } }