TestValidate.php 362 B

1234567891011121314151617
  1. <?php
  2. namespace app\api\validate\test;
  3. use app\api\validate\test\Test;
  4. use app\api\response\ZskkErrorResponse;
  5. class TestValidate {
  6. public static function checkTest($params) {
  7. # code...
  8. $validate = new Test;
  9. if (!$validate->check($params)) {
  10. $msg = $validate->getError();
  11. ZskkErrorResponse::throwParamsError(2001,$msg);
  12. }
  13. }
  14. }