|
@@ -1126,19 +1126,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' => '页面类型至少有两个元素',
|
|
@@ -1147,12 +1149,18 @@ class WebsiteController extends AbstractController
|
|
|
'copyright_information.required' => '版权信息不能为空',
|
|
|
'project_logo.required' => '项目logo不能为空',
|
|
|
'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();
|
|
@@ -1205,12 +1213,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不能为空',
|
|
@@ -1222,11 +1230,17 @@ class WebsiteController extends AbstractController
|
|
|
'copyright_information.required' => '版权信息不能为空',
|
|
|
'project_logo.required' => '项目logo不能为空',
|
|
|
'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()){
|