validate.stub 530 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace {%validateNamespace%};
  3. use think\Validate;
  4. /**
  5. * {%tableComment%}验证器
  6. * Class {%validateName%}
  7. * @package {%validateNamespace%}
  8. */
  9. class {%validateName%} extends Validate
  10. {
  11. /**
  12. * 验证规则
  13. * @var array
  14. */
  15. protected $rule = [
  16. {%validateRules%}
  17. ];
  18. /**
  19. * 错误信息
  20. * @var array
  21. */
  22. protected $message = [
  23. {%validateMessage%}
  24. ];
  25. protected $scene = [];
  26. public function allScene()
  27. {
  28. return array_keys($this->scene);
  29. }
  30. }