refactor: 修改横幅连接类型校验
This commit is contained in:
@@ -23,7 +23,7 @@ class SysBannerItemValidate extends Validate
|
|||||||
'type' => 'in:image,video',
|
'type' => 'in:image,video',
|
||||||
'image' => 'max:255',
|
'image' => 'max:255',
|
||||||
'video' => 'max:255',
|
'video' => 'max:255',
|
||||||
'link_to' => 'require|max:64|in:article,article_category,product,product_category,custom',
|
'link_to' => 'requireWith:image|max:64|in:article,article_category,product,product_category,custom',
|
||||||
'link' => 'max:255',
|
'link' => 'max:255',
|
||||||
'sort' => 'integer',
|
'sort' => 'integer',
|
||||||
'status' => 'in:-1,1'
|
'status' => 'in:-1,1'
|
||||||
@@ -48,7 +48,7 @@ class SysBannerItemValidate extends Validate
|
|||||||
'type.in' => '显示类型必须是image或video',
|
'type.in' => '显示类型必须是image或video',
|
||||||
'image.max' => '图片地址最多不能超过255个字符',
|
'image.max' => '图片地址最多不能超过255个字符',
|
||||||
'video.max' => '视频地址最多不能超过255个字符',
|
'video.max' => '视频地址最多不能超过255个字符',
|
||||||
'link_to.require' => '连接类型不能为空',
|
'link_to.requireWith' => '连接类型不能为空',
|
||||||
'link_to.max' => '连接类型最多不能超过64个字符',
|
'link_to.max' => '连接类型最多不能超过64个字符',
|
||||||
'link_to.in' => '连接类型必须是article,article_category,product,product_category,custom中之一',
|
'link_to.in' => '连接类型必须是article,article_category,product,product_category,custom中之一',
|
||||||
'link.max' => '连接最多不能超过255个字符',
|
'link.max' => '连接最多不能超过255个字符',
|
||||||
|
|||||||
Reference in New Issue
Block a user