SmsConfigValidate.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\adminapi\validate\notification;
  12. use think\Validate;
  13. /**
  14. *
  15. * Class SmsConfigValidate
  16. * @package app\adminapi\validates
  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' => '400387',
  34. 'sms_token.require' => '400388',
  35. ];
  36. }