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.
ymww_backend/application/admin/validate/shopro/goods/Comment.php

31 lines
798 B

1 year ago
<?php
namespace app\admin\validate\shopro\goods;
use think\Validate;
class Comment extends Validate
{
protected $rule = [
'goods_id' => 'require',
'user_id' => 'require',
'level' => 'require|number|between:1,5',
'content' => 'require',
];
protected $message = [
'goods_id.require' => '请选择商品',
'user_id.require' => '请选择用户',
'level.require' => '请选择评价星级',
'level.number' => '请选择评价星级',
'level.between' => '请选择评价星级',
'content.require' => '请填写内容',
];
protected $scene = [
'add' => ['goods_id', 'user_id', 'level', 'content'],
'reply' => ['content'],
];
}