// +---------------------------------------------------------------------- namespace app\adminapi\validate\notification; use think\Validate; /** * * Class SmsConfigValidate * @package app\adminapi\validates */ class SmsConfigValidate extends Validate { /** * 定义验证规则 * @var array */ protected $rule = [ 'yihaotong_appid' => ['require'], 'yihaotong_appsecret' => ['require'], ]; /** * 定义错误信息 * @var array */ protected $message = [ 'yihaotong_appid.require' => '短信账号必须填写', 'yihaotong_appsecret.require' => '短信密码必须填写', ]; }