|
|
@@ -513,12 +513,12 @@ class WaybillsController extends Controller
|
|
|
'destination'=>'required|max:255',
|
|
|
'recipient'=>'required|max:50',
|
|
|
'recipient_mobile'=>['required','regex:/^(\d{7,11})|(1[3|4|5|7|8][0-9]\d{4,8})$/'],
|
|
|
- 'charge'=>'required|min:0|numeric',
|
|
|
+ 'charge'=>'required|min:0|max:999999|numeric',
|
|
|
'collect_fee'=>'nullable|min:0|numeric',
|
|
|
],[
|
|
|
'required'=>':attribute 为必填项',
|
|
|
'alpha_num'=>':attribute 应为字母或数字',
|
|
|
- 'max'=>':attribute 字符过多',
|
|
|
+ 'max'=>':attribute 字符过多或输入值过大',
|
|
|
'regex'=>':attribute 输入有误',
|
|
|
'integer'=>':attribute 应为整数',
|
|
|
'min'=>':attribute 不得为负',
|
|
|
@@ -540,12 +540,12 @@ class WaybillsController extends Controller
|
|
|
if ($request->input('type')=='直发车'){
|
|
|
$validator=Validator::make($request->input(),[
|
|
|
'carrier_bill'=>'required|alpha_num|max:50|unique:waybills,carrier_bill',
|
|
|
- 'fee'=>'required|min:0|numeric',
|
|
|
- 'other_fee'=>'nullable|min:0|numeric',
|
|
|
+ 'fee'=>'required|min:0|numeric|max:999999',
|
|
|
+ 'other_fee'=>'nullable|min:0|numeric|max:999999',
|
|
|
],[
|
|
|
'required'=>':attribute 为必填项',
|
|
|
'alpha_num'=>':attribute 应为字母或数字',
|
|
|
- 'max'=>':attribute 字符过多',
|
|
|
+ 'max'=>':attribute 字符过多或输入值过大',
|
|
|
'min'=>':attribute 不得为负',
|
|
|
'numeric'=>':attribute 应为数字',
|
|
|
'unique'=>':attribute 已存在',
|
|
|
@@ -558,17 +558,17 @@ class WaybillsController extends Controller
|
|
|
}else if ($request->input('type')=='专线'){
|
|
|
$validator=Validator::make($request->input(),[
|
|
|
'carrier_bill'=>'required|alpha_num|max:50|unique:waybills,carrier_bill',
|
|
|
- 'warehouse_weight'=>'required|min:0|numeric',
|
|
|
- 'carrier_weight'=>'required|min:0|numeric',
|
|
|
- 'pick_up_fee'=>'required|min:0|numeric',
|
|
|
- 'other_fee'=>'nullable|min:0|numeric',
|
|
|
+ 'warehouse_weight'=>'required|min:0|numeric|max:999999',
|
|
|
+ 'carrier_weight'=>'required|min:0|numeric|max:999999',
|
|
|
+ 'pick_up_fee'=>'required|min:0|numeric|max:999999',
|
|
|
+ 'other_fee'=>'nullable|min:0|numeric|max:999999',
|
|
|
'carrier_id'=>'required|integer',
|
|
|
'destination_city_id'=>'required|integer',
|
|
|
'carrier_weight_unit_id'=>'required|integer',
|
|
|
],[
|
|
|
'required'=>':attribute 为必填项',
|
|
|
'alpha_num'=>':attribute 应为字母或数字',
|
|
|
- 'max'=>':attribute 字符过多',
|
|
|
+ 'max'=>':attribute 字符过多或输入值过大',
|
|
|
'min'=>':attribute 不得为负',
|
|
|
'numeric'=>':attribute 应为数字',
|
|
|
'unique'=>':attribute 已存在',
|