building-sign/app/validate/Category.php

21 lines
600 B
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
namespace app\validate;
use think\Validate;
class Category extends Validate
{
protected $rule = [
'title' => 'require',
'name' => 'alphaDash',
'model_id' => 'require|number|min:1',
];
protected $message = [
'title.require' => '栏目名称必须',
'name.alphaDash' => '栏目标识必须只能包含字母和数字下划线_及破折号-',
'model_id.require' => '栏目模型必须',
'model_id.number' => '栏目模型格式要正确',
'model_id.min' => '请选择正确的栏目模型'
];
}