SmsConfigValidate.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\validate\admin\notification;
  12. use think\Validate;
  13. /**
  14. *
  15. * Class SmsConfigValidate
  16. * @package app\validates\admin
  17. */
  18. class SmsConfigValidate extends Validate
  19. {
  20. /**
  21. * 定义验证规则
  22. * @var array
  23. */
  24. protected $rule = [
  25. 'sms_account' => ['require'],
  26. 'sms_token' => ['require'],
  27. ];
  28. /**
  29. * 定义错误信息
  30. * @var array
  31. */
  32. protected $message = [
  33. 'sms_account.require' => '短信账号必须填写',
  34. 'sms_token.require' => '短信密码必须填写',
  35. ];
  36. }