logistics/app/adminapi/validate/platform/PlatformValidate.php
unknown 110ada9672 3
2023-08-29 17:19:11 +08:00

52 lines
1.1 KiB
PHP

<?php
// +----------------------------------------------------------------------
namespace app\adminapi\validate\platform;
use app\common\validate\BaseValidate;
/**
* Platform验证器
* Class PlatformValidate
* @package app\adminapi\validate
*/
class PlatformValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'company_name' => 'require',
'company_user' => 'require',
'company_phone' => 'require|mobile',
'company_address' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'company_name' => '公司名称',
'company_user' => '公司负责人',
'company_phone' => '联系电话',
'company_address' => '公司地址',
];
/**
* @notes 添加场景
* @return PlatformValidate
* @author likeadmin
* @date 2023/08/28 13:37
*/
public function sceneSave()
{
return $this->only(['company_name','company_user','company_phone','company_address']);
}
}