Files
sentcms/app/http/validate/admin/Client.php

32 lines
1017 B
PHP
Raw 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
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\http\validate\admin;
use think\Validate;
class Client extends Validate {
protected $rule = [
'title' => 'require|unique:client',
'appid' => 'require|unique:client',
'appsecret' => 'require',
];
protected $message = [
'title.require' => '客户端标题不能为空!',
'appid.require' => 'APPID不能为空',
'appsecret.require' => '秘钥不能为空!',
];
protected $scene = [
'add' => ['title', 'appid', 'appsecret'],
'edit' => ['title', 'appid', 'appsecret'],
];
}