基礎驗證層:
> 定義基礎Base驗證器gocheck驗證方法, 以及通用的驗證規則
BaseValidate.php
~~~
class BaseValidate extends Validate{
public function goCheck(array $data){
$check=$this->batch()->check($data);
if(!$check){
$error=json_encode($this->error,JSON_UNESCAPED_UNICODE);
//拋出參數驗證異常層
throw new ParamExcepthion(['msg'=>$error]);
}else{
return true;
}
}
}
~~~