SampleValidate.php 423 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. *
  4. *User:Administrator
  5. *Date:2021/10/29
  6. */
  7. namespace app\api\validate;
  8. use think\Validate;
  9. class SampleValidate extends Validate
  10. {
  11. protected $rule = [
  12. 'task_id' => 'require|integer',
  13. ];
  14. protected $message = [
  15. 'task_id.require' => '任务id为空',
  16. 'task_id.integer' => '任务id错误',
  17. ];
  18. protected $scene = [
  19. 'get_cyd_list' => ['task_id',],
  20. ];
  21. }