自定义表单功能(X)

This commit is contained in:
2017-07-04 16:10:29 +08:00
parent aef819d417
commit 227705f560
5 changed files with 209 additions and 30 deletions

View File

@@ -0,0 +1,29 @@
<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\common\validate;
/**
* 设置模型
*/
class Form extends Base {
protected $rule = array(
'title' => 'require',
'name' => 'require|unique:form|/^[a-zA-Z]\w{0,39}$/',
);
protected $message = array(
'title.require' => '字段标题不能为空!',
);
protected $scene = array(
'add' => 'title',
'edit' => 'title'
);
}