Initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace app\apis\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class SubscribeValidator extends Validate
|
||||
{
|
||||
// 规则
|
||||
protected $rule = [
|
||||
'email' => 'require|email'
|
||||
];
|
||||
|
||||
// 提示
|
||||
protected $message = [
|
||||
'name.require' => '姓名不能为空',
|
||||
'email.email' => '邮箱格式不正确'
|
||||
];
|
||||
|
||||
// 场景
|
||||
protected $scene = [
|
||||
'store' => [
|
||||
'email'
|
||||
],
|
||||
|
||||
'update' => [
|
||||
|
||||
]
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user