WokerTask/app/adminapi/validate/notice/SmsConfigValidate.php

51 lines
1.7 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\validate\notice;
use app\common\validate\BaseValidate;
/**
* 短信配置验证
* Class SmsConfigValidate
* @package app\adminapi\validate\notice
*/
class SmsConfigValidate extends BaseValidate
{
protected $rule = [
'type' => 'require',
'sign' => 'require',
'app_id' => 'requireIf:type,tencent',
'app_key' => 'requireIf:type,ali',
'secret_id' => 'requireIf:type,tencent',
'secret_key' => 'require',
'status' => 'require',
];
protected $message = [
'type.require' => '请选择类型',
'sign.require' => '请输入签名',
'app_id.requireIf' => '请输入app_id',
'app_key.requireIf' => '请输入app_key',
'secret_id.requireIf' => '请输入secret_id',
'secret_key.require' => '请输入secret_key',
'status.require' => '请选择状态',
];
protected function sceneDetail()
{
return $this->only(['type']);
}
}