You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
894 B
31 lines
894 B
<?php
|
|
|
|
namespace app\admin\validate\setting;
|
|
|
|
use app\admin\validate\AdminBaseValidate;
|
|
|
|
class MarketValidate extends AdminBaseValidate
|
|
{
|
|
protected $rule = [
|
|
'trade_name' => 'require|alphaDash',
|
|
'end_time' => 'date|dateFormat:Y-m-d H:i',
|
|
'max_price' => 'require|float',
|
|
'id' => 'require|integer',
|
|
];
|
|
|
|
protected $message = [
|
|
'trade_name.require' => '交易对无效',
|
|
'trade_name.alphaDash' => '交易对无效',
|
|
'end_time.dateFormat' => '结束时间无效3',
|
|
'end_time.date' => '结束时间无效4',
|
|
'max_price.require' => '价格无效',
|
|
'max_price.float' => '价格无效',
|
|
];
|
|
|
|
protected $scene = [
|
|
'add' => ['trade_name','end_time', 'max_price'],
|
|
'edit' => ['trade_name','end_time', 'max_price', 'id'],
|
|
'del' => ['id'],
|
|
'detail' => ['trade_name'],
|
|
];
|
|
}
|