|
@@ -1183,19 +1183,21 @@ class WebsiteController extends AbstractController
|
|
|
$validator = $this->validationFactory->make(
|
|
|
$requireData,
|
|
|
[
|
|
|
+ 'website_id' =>'required',
|
|
|
'page_type' =>'required|array|min:2',
|
|
|
'statement' =>'required',
|
|
|
'organizer' =>'required',
|
|
|
'copyright_information' =>'required',
|
|
|
'project_logo' =>'required',
|
|
|
- 'record_number' =>'required',
|
|
|
- 'record_number_url' =>'required',
|
|
|
- 'icp_number' =>'required',
|
|
|
- 'icp_number_url' =>'required',
|
|
|
- 'customer_service_qq' =>'required',
|
|
|
- 'communications' =>'required'
|
|
|
- ],
|
|
|
+ 'record_number' =>'required|max:50',
|
|
|
+ 'record_number_url' =>'required|max:100',
|
|
|
+ 'icp_number' =>'required|max:100',
|
|
|
+ 'icp_number_url' =>'required|max:100',
|
|
|
+ 'customer_service_qq' =>'required|max:50',
|
|
|
+ 'communications' =>'required|max:50'
|
|
|
+ ],
|
|
|
[
|
|
|
+ 'website_id.required' => '网站id不能为空',
|
|
|
'page_type.required' => '页面类型不能为空',
|
|
|
'page_type.array' => '页面类型必须是数组',
|
|
|
'page_type.min' => '页面类型至少有两个元素',
|
|
@@ -1206,12 +1208,18 @@ class WebsiteController extends AbstractController
|
|
|
'project_logo.image' => '项目logo必须是图片',
|
|
|
'project_logo.max' => '项目logo大小不能超过500kb',
|
|
|
'record_number.required' => '网安备案号不能为空',
|
|
|
+ 'record_number.max' => '网安备案号不能超过50个字符',
|
|
|
'record_number_url.required' => '网安备案号链接不能为空',
|
|
|
+ 'record_number_url.max' => '网安备案号链接不能超过100个字符',
|
|
|
'icp_number.required' => '网站备案号不能为空',
|
|
|
+ 'icp_number.max' => '网站备案号不能超过100个字符',
|
|
|
'icp_number_url.required' => '网站备案号链接不能为空',
|
|
|
+ 'icp_number_url.max' => '网站备案号链接不能超过100个字符',
|
|
|
'customer_service_qq.required' => '客服qq不能为空',
|
|
|
- 'communications.required' => '通联qq不能为空'
|
|
|
- ]
|
|
|
+ 'customer_service_qq.max' => '客服qq不能超过50个字符',
|
|
|
+ 'communications.required' => '通联qq不能为空',
|
|
|
+ 'communications.max' => '通联qq不能超过50个字符'
|
|
|
+ ]
|
|
|
);
|
|
|
if ($validator->fails()){
|
|
|
$errorMessage = $validator->errors()->first();
|
|
@@ -1264,12 +1272,12 @@ class WebsiteController extends AbstractController
|
|
|
'organizer' =>'required',
|
|
|
'copyright_information' =>'required',
|
|
|
'project_logo' =>'required',
|
|
|
- 'record_number' =>'required',
|
|
|
- 'record_number_url' =>'required',
|
|
|
- 'icp_number' =>'required',
|
|
|
- 'icp_number_url' =>'required',
|
|
|
- 'customer_service_qq' =>'required',
|
|
|
- 'communications' =>'required'
|
|
|
+ 'record_number' =>'required|max:50',
|
|
|
+ 'record_number_url' =>'required|max:100',
|
|
|
+ 'icp_number' =>'required|max:100',
|
|
|
+ 'icp_number_url' =>'required|max:100',
|
|
|
+ 'customer_service_qq' =>'required|max:50',
|
|
|
+ 'communications' =>'required|max:50'
|
|
|
],
|
|
|
[
|
|
|
'website_id.required' => '网站id不能为空',
|
|
@@ -1283,13 +1291,17 @@ class WebsiteController extends AbstractController
|
|
|
'project_logo.image' => '项目logo必须是图片',
|
|
|
'project_logo.max' => '项目logo大小不能超过500kb',
|
|
|
'record_number.required' => '网安备案号不能为空',
|
|
|
+ 'record_number.max' => '网安备案号不能超过50个字符',
|
|
|
'record_number_url.required' => '网安备案号链接不能为空',
|
|
|
+ 'record_number_url.max' => '网安备案号链接不能超过100个字符',
|
|
|
'icp_number.required' => '网站备案号不能为空',
|
|
|
+ 'icp_number.max' => '网站备案号不能超过100个字符',
|
|
|
'icp_number_url.required' => '网站备案号链接不能为空',
|
|
|
+ 'icp_number_url.max' => '网站备案号链接不能超过100个字符',
|
|
|
'customer_service_qq.required' => '客服qq不能为空',
|
|
|
+ 'customer_service_qq.max' => '客服qq不能超过50个字符',
|
|
|
'communications.required' => '通联qq不能为空',
|
|
|
- 'company_logo.image' => '公司logo必须是图片',
|
|
|
- 'company_logo.max' => '公司logo大小不能超过500kb'
|
|
|
+ 'communications.max' => '通联qq不能超过50个字符'
|
|
|
]
|
|
|
);
|
|
|
|