ywtc_api/application/activity/validate/Category.php

31 lines
916 B
PHP

<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: yunwuxin <448901948@qq.com>
// +----------------------------------------------------------------------
namespace app\other\validate;
use think\Validate;
/**
* 商品分类
* @author 王海鑫
*/
class Category extends Validate
{
//定义验证规则
protected $rule = [
'title|分类名称' => 'require'
];
protected $message = [
'title.require' => '分类名称不能为空',
];
}