DemoValidate.php 977 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: 小夏 < 449134904@qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace plugins\demo\validate;
  12. use think\Validate;
  13. class DemoValidate extends Validate
  14. {
  15. protected $rule = [
  16. 'title' => 'require',
  17. ];
  18. protected $message = [
  19. 'title.require' => '标题不能为空',
  20. ];
  21. protected $scene = [
  22. // 'add' => ['user_login,user_pass,user_email'],
  23. // 'edit' => ['user_login,user_email'],
  24. ];
  25. }