CommentValidate.php
607 字节
<?php
/**
* Author: xiaojie
* DateTime: 2018/12/03 17:15
*/
namespace app\portal\validate;
use think\Validate;
class CommentValidate extends Validate
{
protected $rule = [
'post_id' => 'require|number',
'content' => 'require',
'url' => 'require'
];
protected $message = [
'post_id.require' => '评论文章id不能为空!',
'post_id.number' => '评论文章id必须为数字!',
'content.require' => '评论内容不能为空!',
'url.require' => '文章链接不能为空!',
];
protected $scene = [
];
}